Comment #9 on issue 2110 by asmeurer: failing tests
http://code.google.com/p/sympy/issues/detail?id=2110
I get this in the latest master in Python 2.7.1 (64-bit):
In [1]: floor((GoldenRatio**999 / sqrt(5) + Rational(1,2))).evalf()
---------------------------------------------------------------------------
PrecisionExhausted Traceback (most recent call last)
/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython console> in
<module>()
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.py in
evalf(self, n, subs, maxn, chop, strict, quad, verbose)
1037 options['quad'] = quad
1038 try:
-> 1039 result = evalf(self, prec+4, options)
1040 except NotImplementedError:
1041 # Fall back to the ordinary evalf
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.py in
evalf(x, prec, options)
969 try:
970 rf = evalf_table[x.func]
--> 971 r = rf(x, prec, options)
972 except KeyError:
973 #r = finalize_complex(x._eval_evalf(prec)._mpf_, fzero,
prec)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.py in
evalf_floor(expr, prec, options)
252
253 def evalf_floor(expr, prec, options):
--> 254 return get_integer_part(expr.args[0], -1, options)
255
256
#----------------------------------------------------------------------------#
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.py in
get_integer_part(expr, no, options, return_ints)
240
241 if ire:
--> 242 re, re_acc = calc_part(C.re(expr, evaluate=False), ire)
243 if iim:
244 im, im_acc = calc_part(C.im(expr, evaluate=False), iim)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.py in
calc_part(expr, nexpr)
232 expr = C.Add(expr, -nint, evaluate=False)
233 x, _, x_acc, _ = evalf(expr, 10, options)
--> 234 check_target(expr, (x, None, x_acc, None), 3)
235 nint += int(no*(mpf_cmp(x or fzero, fzero) == no))
236 nint = from_int(nint)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.py in
check_target(expr, result, prec)
194 raise PrecisionExhausted("Failed to distinguish the
expression: \n\n%s\n\n"
195 "from zero. Try simplifying the input, using chop=True,
or providing "
--> 196 "a higher maxn for evalf" % (expr))
197
198 def get_integer_part(expr, no, options, return_ints=False):
PrecisionExhausted: Failed to distinguish the expression:
-26863810024485359386146727202142923967616609318986952340123175997617981700247881689338369654483356564191827856161443356312976673642210350324634850410377680367334151172899169723197082763985615764450078474174626
+
re(1/2 + 5**(1/2)*GoldenRatio**999/5)
from zero. Try simplifying the input, using chop=True, or providing a
higher maxn for evalf
In [2]: str(GoldenRatio**999 + S(1)/2)
Out[2]: 1/2 + GoldenRatio**999
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.