Opened 3 years ago

Closed 3 years ago

#22219 closed enhancement (fixed)

Upgrade to pynac-0.7.4

Reported by: rws Owned by:
Priority: major Milestone: sage-7.6
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: 57c7bce (Commits) Commit: 57c7bcef7b1d94ef86c4278b0cf11c13dbfb854d
Dependencies: Stopgaps:

Description (last modified by dkrenn)

From pynac-0.7.4 Changelog:

  • improve domain logic (#18883, #22026)
  • improve derivatives of conjugate, real, imag, abs (#22209)
  • precision was lost with some useries
  • replace crationality with exactness when deciding when to evalf (fixes #22142)
  • fix giac support
  • expose to_gamma() and gamma_normalize() to Sage (#22174)
  • improve gamma normalization in Gosper summation
  • performance improvements
  • fix inconsistent handling of exact function arguments (#22142)

With this ticket we also finally turn on Giac support in Pynac (used for GCD) again (#21885).

https://github.com/pynac/pynac/releases/download/pynac-0.7.4/pynac-0.7.4.tar.bz2

Change History (14)

comment:1 Changed 3 years ago by rws

  • Branch set to u/rws/upgrade_to_pynac_0_7_4

comment:2 Changed 3 years ago by rws

  • Authors set to Ralf Stephan
  • Commit set to a178a75b2cda70c50544e13400327be23e1fe7e9
  • Status changed from new to needs_review

New commits:

11951c822219: pkg version/chksum
91973f122219: giac usage is GO
a178a7522219: doctest fixes

comment:3 Changed 3 years ago by jpflori

I get a bunch of errors when running tests on a POWER7:

sage: y = var('y')
sage: g = x + y/(x + 2); g
x + y/(x + 2)
sage: g
x + y/(x + 2)
sage: g.numerator()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-4-7f8c42e112c2> in <module>()
----> 1 g.numerator()

/home/jpflori/sage.git/src/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.numerator (/home/jpflori/sage.git/src/build/cythonized/sage/symbolic/expression.cpp:45767)()
   8608         cdef GEx oper, power
   8609         if normalize:
-> 8610             return new_Expression_from_GEx(self._parent, self._gobj.numer())
   8611         elif is_a_mul(self._gobj):
   8612             for i from 0 <= i < self._gobj.nops():

RuntimeError: Exponent overflow Error: Bad Argument Value

comment:4 Changed 3 years ago by rws

Could you please do the following: start sage -gdb, hit Ctrl-Z to get the gdb prompt, input catch throw then give c<Enter> until you get back to the Sage prompt. Now on error you should be thrown directly down to gdb. Now I would be interested in a backtrace that you can get with bt. I don't need the full list, please give me just the C++ part, i.e. everything until you see the Py... functions.

comment:5 Changed 3 years ago by jpflori

Here you go:

#0  0x00003fffac10ae54 in .__cxa_throw () from /lib64/libstdc++.so.6
#1  0x00003ffb20b99b38 in giac::undeferr (
    s="Exponent overflow Error: Bad Argument Value") at gen.cc:445
#2  0x00003ffb20b99f84 in giac::gensizeerr (s=...) at gen.cc:485
#3  0x00003ffb20c0110c in giac::pow (base=..., exponent=<optimized out>)
    at gen.cc:7096
#4  0x00003ffb20472644 in giac::giac_gcd_modular_algo1 (p=..., q=..., d=...)
    at modpoly.cc:7309
#5  0x00003ffb2047af4c in giac::gcd_modular_algo1 (p=..., q=..., d=..., 
    compute_cof=<optimized out>) at modpoly.cc:7675
#6  0x00003ffb201decc4 in giac::gcd_modular_algo (p=..., q=..., d=..., 
    compute_cof=<optimized out>) at gausspol.cc:3513
#7  0x00003ffb2047bc38 in giac::gcd_modular (p_orig=..., q_orig=..., pgcd=..., 
    pcofactor=..., qcofactor=..., compute_cofactors=<optimized out>)
    at modpoly.cc:2878
#8  0x00003ffb201bcb28 in giac::gcdheu (p_orig=..., 
    p_deg=std::vector of length 1, capacity 1 = {...}, q_orig=..., 
    q_deg=std::vector of length 1, capacity 1 = {...}, p_simp=..., 
    np_simp=..., q_simp=..., nq_simp=..., d=..., d_content=..., 
    skip_test=skip_test@entry=false, 
    compute_cofactors=compute_cofactors@entry=false) at gausspol.cc:3920
#9  0x00003ffb201c256c in giac::gcd (p=..., q=..., d=...) at gausspol.cc:4675
#10 0x00003ffb201c1eec in giac::gcd (p=..., q=..., d=...) at gausspol.cc:4657
#11 0x00003ffb201c2c9c in giac::gcd (p=..., q=...) at gausspol.cc:4693
#12 0x00003ffb201c7988 in giac::has_constant_variables_gcd (p=..., q=..., 
    d=...) at gausspol.cc:3756
#13 0x00003ffb201c2418 in giac::gcd (p=..., q=..., d=...) at gausspol.cc:4669
#14 0x00003ffb210d1b0c in GiNaC::gcdpoly (a=..., b=..., ca=0x3fffffff9b18, 
    cb=0x3fffffff9b10, check_args=<optimized out>) at mpoly-giac.cpp:392
#15 0x00003ffb21100a28 in GiNaC::frac_cancel (n=..., d=...) at normal.cpp:405
#16 0x00003ffb211016f0 in GiNaC::add::normal (this=<optimized out>, repl=..., 
    rev_lookup=..., level=<optimized out>, options=<optimized out>)
    at normal.cpp:491
#17 0x00003ffb210f9cec in GiNaC::ex::numer (this=<optimized out>)
    at normal.cpp:646
...

comment:6 Changed 3 years ago by jpflori

Which looks very giac related. I think I got other giac errors (without going through pynac), I'll have to check.

comment:7 Changed 3 years ago by jpflori

It might be http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?f=19&t=1723 so completely pynac unrelated.

comment:8 follow-up: Changed 3 years ago by jpflori

And I guess it also means the dependencies file should mention giac.

comment:9 Changed 3 years ago by git

  • Commit changed from a178a75b2cda70c50544e13400327be23e1fe7e9 to 57c7bcef7b1d94ef86c4278b0cf11c13dbfb854d

Branch pushed to git repo; I updated commit sha1. New commits:

c7eb7ffMerge branch 'develop' into t/22219/upgrade_to_pynac_0_7_4
57c7bce22219: giac dependency

comment:10 in reply to: ↑ 8 Changed 3 years ago by rws

Replying to jpflori:

And I guess it also means the dependencies file should mention giac.

Yes, I always forget that.

comment:11 Changed 3 years ago by dkrenn

  • Description modified (diff)

comment:12 Changed 3 years ago by dkrenn

FYI, Everything seem to work fine on Linux Mint 17.3.

comment:13 Changed 3 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:14 Changed 3 years ago by vbraun

  • Branch changed from u/rws/upgrade_to_pynac_0_7_4 to 57c7bcef7b1d94ef86c4278b0cf11c13dbfb854d
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.