Status: Valid
Owner: ----
CC: fred...@witherden.org
Labels: Type-Defect Priority-Medium

New issue 3449 by asmeu...@gmail.com: Autowrap ((x - y)**25).expand() is a bad example
http://code.google.com/p/sympy/issues/detail?id=3449

This was originally https://github.com/sympy/sympy/issues/1593.

Following the example given in the documentation:

In [1]: from sympy.utilities.autowrap import autowrap
In [2]: from sympy.abc import x,y
In [3]: expr = ((x - y)**(25)).expand()
In [4]: fn = autowrap(expr, language='C', backend='Cython')
In [5]: fn(3, 2)
Out[5]: 0.0
Which is incorrect (subs can be used to trivially show that the correct result is 1). This is simply a limitation of double precision.

I therefore suggest that something more reasonable is selected given that the current example may give the (incorrect) impression that the autowrapping system is broken. Or, better still, use it as an example of a caveat of using autowrap.


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@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.

Reply via email to