Opened 14 months ago
Closed 13 months ago
#24418 closed defect (fixed)
Doctest: bug numerical_approx(2^(450232897/4888643760))
Reported by:  vdelecroix  Owned by:  

Priority:  major  Milestone:  sage8.2 
Component:  symbolics  Keywords:  bug 
Cc:  rws  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Jeroen Demeyer 
Report Upstream:  N/A  Work issues:  
Branch:  821f7d9 (Commits)  Commit:  821f7d9f3568316bc0b8b1f5619bcef46cd3bfe1 
Dependencies:  Stopgaps: 
Description (last modified by )
sage: numerical_approx(2^(450232897/4888643760))  RuntimeError Traceback (most recent call last) <ipythoninput23c4e30ac02c1> in <module>() > 1 numerical_approx(Integer(2)**(Integer(450232897)/Integer(4888643760))) /opt/sage/local/lib/python2.7/sitepackages/sage/misc/functional.pyc in numerical_approx(x, prec, digits, algorithm) 1406 return numerical_approx_generic(x, prec) 1407 else: > 1408 return n(prec, algorithm=algorithm) 1409 1410 n = numerical_approx /opt/sage/src/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.numerical_approx (build/cythonized/sage/symbolic/expression.cpp:36040)() 5813 5814 s = DefiniteSumExpander(self) > 5815 cdef Expression x = self._parent(s()) 5816 from sage.rings.real_mpfr import RealField 5817 R = RealField(prec) /opt/sage/local/lib/python2.7/sitepackages/sage/symbolic/expression_conversions.pyc in __call__(self, ex) 216 div = self.get_fake_div(ex) 217 return self.arithmetic(div, div.operato > 218 return self.arithmetic(ex, operator) 219 elif operator in relation_operators: 220 return self.relation(ex, operator) /opt/sage/local/lib/python2.7/sitepackages/sage/symbolic/expretic(self, ex, operator) 1931 True 1932 """ > 1933 return reduce(operator, map(self, ex.operands() 1934 1935 def composition(self, ex, operator): /opt/sage/src/sage/symbolic/expression.pyx in sage.symbolic.expd/cythonized/sage/symbolic/expression.cpp:26528)() 3962 relational_operator(base 3963 else: > 3964 x = g_pow(base._gobj, nexp._gobj) 3965 return new_Expression_from_GEx(base._parent 3966 if BOTH_ARE_ELEMENT(cl): RuntimeError:
The following works
sage: 2^(450232897/4888643760) 2^(450232897/4888643760) sage: 2.0^(450232897/4888643760) 1.06591892580915
Original report on sagedevel.
Change History (12)
comment:1 Changed 14 months ago by
 Description modified (diff)
comment:2 Changed 14 months ago by
comment:3 Changed 14 months ago by
 Report Upstream changed from N/A to Fixed upstream, in a later stable release.
comment:4 Changed 13 months ago by
 Branch set to u/rws/bug_numerical_approx_2__450232897_4888643760__
comment:5 Changed 13 months ago by
 Commit set to 4d559ee326f1a93bfb6049326dff05512db60399
 Report Upstream changed from Fixed upstream, in a later stable release. to N/A
 Summary changed from bug numerical_approx(2^(450232897/4888643760)) to Doctest: bug numerical_approx(2^(450232897/4888643760))
New commits:
4d559ee  24418: Doctest

comment:6 Changed 13 months ago by
 Status changed from new to needs_review
comment:7 Changed 13 months ago by
 Reviewers set to Jeroen Demeyer
 Status changed from needs_review to positive_review
comment:8 Changed 13 months ago by
 Commit changed from 4d559ee326f1a93bfb6049326dff05512db60399 to a2a47a80edb681e64c623e4a4420c7ac7fb4c1d1
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
a2a47a8  24418: fixes

comment:9 Changed 13 months ago by
Ah that was a typo which I couldn't cancel fast enough, sorry.
comment:10 Changed 13 months ago by
 Branch changed from u/rws/bug_numerical_approx_2__450232897_4888643760__ to u/rws/244181
comment:11 Changed 13 months ago by
 Commit changed from a2a47a80edb681e64c623e4a4420c7ac7fb4c1d1 to 821f7d9f3568316bc0b8b1f5619bcef46cd3bfe1
 Status changed from needs_review to positive_review
New commits:
821f7d9  24418: Doctest

comment:12 Changed 13 months ago by
 Branch changed from u/rws/244181 to 821f7d9f3568316bc0b8b1f5619bcef46cd3bfe1
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Wrong usage of MPZ size query functions in Pynac. Fixed in 0.7.15. If you cannot wait apply this patch: https://github.com/pynac/pynac/commit/163a26940a1a07aaea12ff82532a6c3ea4162c91.diff,