Opened 5 years ago
Closed 5 years ago
#24668 closed defect (fixed)
Upgrade to pynac0.7.16
Reported by:  Ralf Stephan  Owned by:  

Priority:  major  Milestone:  sage8.2 
Component:  packages: standard  Keywords:  
Cc:  François Bissey  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  2568492 (Commits, GitHub, GitLab)  Commit:  2568492aea64d516c2216e5d05e2548c23c66215 
Dependencies:  Stopgaps: 
Description
In pynac0.7.16:
 Python interface / Py3 fixes and improvements (thx Erik Bray, #24561)
atan2
fixes (#24604)beta
fixes fix
atanh/acoth(real)
andpolylog
(#24299)  immediate atanh/acoth > log simplifications (#24658)
legendre_P
(#24553)chebyshev_T/U
(#16812) speedup in special polynomial creation
 remove clangcheck error
 remove many clangtidy warnings
 remove unused code
 added CONTRIBUTING.md
https://github.com/pynac/pynac/releases/download/pynac0.7.16/pynac0.7.16.tar.bz2
Change History (12)
comment:1 Changed 5 years ago by
Branch:  → u/rws/upgrade_to_pynac_0_7_16 

comment:2 Changed 5 years ago by
Authors:  → Ralf Stephan 

Commit:  → 67f9ddc48ffe5258b610e1af60ef0ca9fcb7c3db 
Status:  new → needs_review 
comment:3 Changed 5 years ago by
Reviewers:  → Travis Scrimshaw 

Status:  needs_review → positive_review 
LGTM. Next step: to the buildbots.
comment:5 Changed 5 years ago by
Cc:  François Bissey added 

comment:6 Changed 5 years ago by
Status:  positive_review → needs_work 

Some numerical noise:
File "src/sage/symbolic/expression.pyx", line 8331, in sage.symbolic.expression.Expression.arctan2 Failed example: SR(1).arctan2(CDF(0,1)) Expected: 0.7853981633974484  19.012501686914433*I Got: 0.7853981633974483  19.012518200244195*I ********************************************************************** 1 item had failures: 1 of 35 in sage.symbolic.expression.Expression.arctan2 [2807 tests, 1 failure, 32.96 s]
comment:7 Changed 5 years ago by
The imaginary part changed a lot. More than just the usual numerical noise.
comment:8 Changed 5 years ago by
The reason for the relative big error is in the formula that is applied in libs/pynac/pynac.pyx
: return I*py_log((x + I*y)/py_sqrt(x**2 + y**2))
with x=CDF(I), y=1
. The denominator sqrt(x**2 + y**2)
would be 0, but CDF(I)^2
is 1.0 + 1.2246467991473532e16*I
and so the sqrt denominator becomes 7.82510958117314e09 + 7.825109581173138e09*I
.
For any other complex type of I
as second argument I get an exception so I'm tempted to mark it as known bug.
comment:9 Changed 5 years ago by
Commit:  67f9ddc48ffe5258b610e1af60ef0ca9fcb7c3db → 2568492aea64d516c2216e5d05e2548c23c66215 

Branch pushed to git repo; I updated commit sha1. New commits:
2568492  24668: fix doctest

comment:10 Changed 5 years ago by
Status:  needs_work → positive_review 

comment:11 Changed 5 years ago by
Actually that numeric result was changed in this ticket. Before, the result was not evaluated. However this pynac version tries to evaluate atan2 even with complex values that have nonzero imag part.
comment:12 Changed 5 years ago by
Branch:  u/rws/upgrade_to_pynac_0_7_16 → 2568492aea64d516c2216e5d05e2548c23c66215 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
24668: version/chzksum
24668: doctest fixes