Opened 4 years ago
Closed 4 years ago
#22969 closed enhancement (fixed)
Upgrade to Pynac0.7.7
Reported by:  rws  Owned by:  

Priority:  major  Milestone:  sage8.0 
Component:  packages: standard  Keywords:  
Cc:  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  c1cff2d (Commits, GitHub, GitLab)  Commit:  c1cff2dbe8921a381d2bc3148946f6907019462c 
Dependencies:  #23001  Stopgaps: 
Description (last modified by )
Pynac0.7.7 changes:
 fix regression in Singular interface (last minute fix of #22838)
 fix series problems (#22959)
 fix dilog/polylog numerics (#18386, #19906)
 avoid Python errors when comparing complex in richcmp
 general handling of evalf of onearg functions (obsoletes py_sin etc)
https://github.com/pynac/pynac/releases/download/pynac0.7.7/pynac0.7.7.tar.bz2
Change History (14)
comment:1 Changed 4 years ago by
 Branch set to u/rws/upgrade_to_pynac_0_7_7
comment:2 Changed 4 years ago by
 Commit set to 894c5f288f95ac22b7d468687c470ce046dbbc23
 Description modified (diff)
 Status changed from new to needs_review
comment:3 Changed 4 years ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
LGTM. Off to the buildbots.
comment:4 Changed 4 years ago by
 Status changed from positive_review to needs_work
On OSX:
sage t long src/sage/functions/log.py ********************************************************************** File "src/sage/functions/log.py", line 434, in sage.functions.log.Function_polylog.__init__ Failed example: polylog(2, 1.0) Expected: NaN Got: NaN + NaN*I ********************************************************************** File "src/sage/functions/log.py", line 436, in sage.functions.log.Function_polylog.__init__ Failed example: polylog(2.0, 1.0) Expected: NaN Got: NaN + NaN*I ********************************************************************** 1 item had failures: 2 of 26 in sage.functions.log.Function_polylog.__init__ [271 tests, 2 failures, 9.23 s]
comment:5 followup: ↓ 7 Changed 4 years ago by
The difference may be due to different results from cmp(RBF(NaN),1)
on OSX (?, Linux gives 1
) but it shows things can be done better in other parts of the computation.
comment:6 Changed 4 years ago by
There will be a new release, specifically usage of PyObject_Cmp
will be phased out.
I hope the following is False
on OSX too, as my attempt to fix the above depends on it:
sage: RBF(NaN)._richcmp_(RBF(1),0) False
If this is different then we'll depend on #23001 for a fix.
comment:7 in reply to: ↑ 5 Changed 4 years ago by
The difference may be due to different results from
cmp(RBF(NaN),1)
on OSX (?, Linux gives1
) but it shows things can be done better in other parts of the computation.
No this is not the reason.
comment:8 Changed 4 years ago by
 Commit changed from 894c5f288f95ac22b7d468687c470ce046dbbc23 to c1cff2dbe8921a381d2bc3148946f6907019462c
Branch pushed to git repo; I updated commit sha1. New commits:
0203090  Merge branch 'develop' into t/22969/upgrade_to_pynac_0_7_7

a6ac3d6  23001: is_NaN for elements of CC, CDF, CIF

ca839ea  23001: is_NaN for ball fields

5f8b703  23001: NaN backconversion with interval fields

920e5ad  23001: Backconvert complex NaN (NaN+NaN*I) to the resp. real field

33b3163  Merge branch 'u/rws/implement_is_nan_for_all_rings_with_nan_elements' of git://trac.sagemath.org/sage into t/22969/upgrade_to_pynac_0_7_7

c1cff2d  22969: apply commits b65c3f7bd and ece8bd967 from future pynac

comment:9 Changed 4 years ago by
 Dependencies set to #23001
 Status changed from needs_work to needs_review
OK, no new release, but I added a patch and it all depends on #23001. I'm pretty sure this fixes the issue which was very poor programmingI relied on undefined behaviour to get the right result.
comment:10 Changed 4 years ago by
 Status changed from needs_review to positive_review
Back to the buildbots.
comment:11 Changed 4 years ago by
Doesn't build for me with the added patch
libtool: compile: x86_64pclinuxgnug++ DHAVE_CONFIG_H I. I.. I/usr/include/python2.7 DSING_NDEBUG DOM_NDEBUG DSING_NDEBUG DOM_NDEBUG Wall Wextra Wshadow Wnonvirtualdtor Wnounusedparameter march=native O2 pipe std=gnu++11 c numeric.cpp fPIC DPIC o .libs/libpynac_lanumeric.o In file included from /usr/include/python2.7/Python.h:8:0, from basic.h:26, from numeric.h:49, from numeric.cpp:55: /usr/include/python2.7/pyconfig.h:1193:0: warning: "_POSIX_C_SOURCE" redefined #define _POSIX_C_SOURCE 200112L ^ In file included from /usr/include/stdlib.h:24:0, from /usr/include/flint/fmpz.h:37, from numeric.cpp:52: /usr/include/features.h:225:0: note: this is the location of the previous definition # define _POSIX_C_SOURCE 200809L ^ In file included from /usr/include/python2.7/Python.h:8:0, from basic.h:26, from numeric.h:49, from numeric.cpp:55: /usr/include/python2.7/pyconfig.h:1215:0: warning: "_XOPEN_SOURCE" redefined #define _XOPEN_SOURCE 600 ^ In file included from /usr/include/stdlib.h:24:0, from /usr/include/flint/fmpz.h:37, from numeric.cpp:52: /usr/include/features.h:166:0: note: this is the location of the previous definition # define _XOPEN_SOURCE 700 ^ numeric.cpp: In member function ‘bool GiNaC::numeric::operator<=(const GiNaC::numeric&) const’: numeric.cpp:1996:95: error: ‘Pynac_PyObj_RichCmp’ was not declared in this scope return Pynac_PyObj_RichCmp(v._pyobject, right.v._pyobject, Py_LE, "<="); ^ numeric.cpp: In member function ‘bool GiNaC::numeric::operator>(const GiNaC::numeric&) const’: numeric.cpp:2020:94: error: ‘Pynac_PyObj_RichCmp’ was not declared in this scope return Pynac_PyObj_RichCmp(v._pyobject, right.v._pyobject, Py_GT, ">"); ^ numeric.cpp: In member function ‘bool GiNaC::numeric::operator>=(const GiNaC::numeric&) const’: numeric.cpp:2044:95: error: ‘Pynac_PyObj_RichCmp’ was not declared in this scope return Pynac_PyObj_RichCmp(v._pyobject, right.v._pyobject, Py_GE, ">="); ^ make[2]: *** [Makefile:854: libpynac_lanumeric.lo] Error 1 make[2]: Leaving directory '/dev/shm/portage/scilibs/pynac0.7.7r1/work/pynac0.7.7/ginac'
comment:12 Changed 4 years ago by
 Status changed from positive_review to needs_work
Yes it looks like you forgot those 3 instances of Pynac_PyObj_RichCmp
when switching to PyObject_RichCompareBool
.
comment:13 Changed 4 years ago by
 Status changed from needs_work to positive_review
Somehow I missed part of the patch. Not sure how it happened but it is all there. Sorry for the noise.
comment:14 Changed 4 years ago by
 Branch changed from u/rws/upgrade_to_pynac_0_7_7 to c1cff2dbe8921a381d2bc3148946f6907019462c
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
22969: pynac0.7.7 version/chksum/delete old patch
22969: doctest fixes