Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Evalf
New issue 3840 by [email protected]: ceiling.evalf doesn't work
http://code.google.com/p/sympy/issues/detail?id=3840
In [9]: ceiling(x).evalf(subs={x:3})
---------------------------------------------------------------------------
PrecisionExhausted Traceback (most recent call last)
<ipython-input-9-f60deb309c4a> in <module>()
----> 1 ceiling(x).evalf(subs={x:3})
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.pyc in
evalf(self, n, subs, maxn, chop, strict, quad, verbose)
1280 options['quad'] = quad
1281 try:
-> 1282 result = evalf(self, prec + 4, options)
1283 except NotImplementedError:
1284 # Fall back to the ordinary evalf
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.pyc in
evalf(x, prec, options)
1180 try:
1181 rf = evalf_table[x.func]
-> 1182 r = rf(x, prec, options)
1183 except KeyError:
1184 try:
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.pyc in
evalf_ceiling(expr, prec, options)
341
342 def evalf_ceiling(expr, prec, options):
--> 343 return get_integer_part(expr.args[0], 1, options)
344
345
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.pyc in
get_integer_part(expr, no, options, return_ints)
331
332 if ire:
--> 333 re, re_acc = calc_part(C.re(expr, evaluate=False), ire)
334 if iim:
335 im, im_acc = calc_part(C.im(expr, evaluate=False), iim)
/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/evalf.pyc in
calc_part(expr, nexpr)
322 except PrecisionExhausted:
323 if not expr.equals(0):
--> 324 raise PrecisionExhausted
325 x = fzero
326 nint += int(no*(mpf_cmp(x or fzero, fzero) == no))
PrecisionExhausted:
Given issue 3839, I suspect that ceiling does not set that it's mpmath
equivalent is called ceil (and by the way, why don't we also use ceil? The
standard library math library also calls it ceil.)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.