On Wed, Oct 05, 2022 at 10:41:58PM +0200, Bill Allombert wrote: > On Wed, Sep 21, 2022 at 11:57:40PM +0300, Adrian Bunk wrote: > > Testing cypari2.gen > > ********************************************************************** > > File > > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/gen.cpython-310-x86_64-linux-gnu.so", > > line ?, in cypari2.gen.Gen.__complex__ > > Failed example: > > complex(g) > > Differences (ndiff with -expected +actual): > > - (2.2847006554165614+0j) > > + (1.118033988749895+0j) > > ********************************************************************** > > File > > "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cypari2/build/cypari2/gen.cpython-310-x86_64-linux-gnu.so", > > line ?, in cypari2.gen.__test__.Gen.__complex__ (line 2006) > > Failed example: > > complex(g) > > Differences (ndiff with -expected +actual): > > - (2.2847006554165614+0j) > > + (1.118033988749895+0j) > > ********************************************************************** > > 2 items had failures: > > 1 of 13 in cypari2.gen.Gen.__complex__ > > 1 of 13 in cypari2.gen.__test__.Gen.__complex__ (line 2006) > > This one is a bug in PARI/GP, that has been fixed in master. > Once we get to the point it is the only remaining show stopper, I will > update PARI/GP in sid.
Also I consider the error message change - PariError: call_python: forbidden multiplication t_VEC (1 elts) * t_VEC (1 elts) + PariError: call_python: incorrect type in qfbcomp (t_VEC) to be a bug in PARI/GP that I will fix too. For the others, I join a patch. Cheers, -- Bill. <ballo...@debian.org> Imagine a large red swirl here.
Index: cypari2-2.1.2/cypari2/handle_error.pyx =================================================================== --- cypari2-2.1.2.orig/cypari2/handle_error.pyx +++ cypari2-2.1.2/cypari2/handle_error.pyx @@ -123,7 +123,7 @@ class PariError(RuntimeError): >>> pari('!@#$%^&*()') Traceback (most recent call last): ... - PariError: syntax error, unexpected $undefined + PariError: syntax error, unexpected invalid token """ return self.errtext().rstrip(" .:") Index: cypari2-2.1.2/cypari2/pari_instance.pyx =================================================================== --- cypari2-2.1.2.orig/cypari2/pari_instance.pyx +++ cypari2-2.1.2/cypari2/pari_instance.pyx @@ -1325,9 +1325,9 @@ cdef class Pari(Pari_auto): >>> pari = cypari2.Pari() >>> x = pari('x') >>> pari.genus2red([-5*x**5, x**3 - 2*x**2 - 2*x + 1]) - [1416875, [2, -1; 5, 4; 2267, 1], x^6 - 240*x^4 - 2550*x^3 - 11400*x^2 - 24100*x - 19855, [[2, [2, [Mod(1, 2)]], []], [5, [1, []], ["[V] page 156", [3]]], [2267, [2, [Mod(432, 2267)]], ["[I{1-0-0}] page 170", []]]]] + [1416875, [2, -1; 5, 4; 2267, 1], [-6*x^5 + 2*x^3 - x, x^3 + 1], [[2, [2, [Mod(1, 2)]], []], [5, [1, []], ["[V] page 156", [3]]], [2267, [2, [Mod(432, 2267)]], ["[I{1-0-0}] page 170", []]]]] >>> pari.genus2red([-5*x**5, x**3 - 2*x**2 - 2*x + 1],2267) - [2267, Mat([2267, 1]), x^6 - 24*x^5 + 10*x^3 - 4*x + 1, [2267, [2, [Mod(432, 2267)]], ["[I{1-0-0}] page 170", []]]] + [2267, Mat([2267, 1]), [-6*x^5 + 2*x^3 - x, x^3 + 1], [2267, [2, [Mod(432, 2267)]], ["[I{1-0-0}] page 170", []]]] """ cdef Gen t0 = objtogen(P) if p is None: