Comment #5 on issue 1321 by fabian.seoane: trigonometric functions of  
floating-point numbers should return floating-point numbers
http://code.google.com/p/sympy/issues/detail?id=1321

response to #2 and #4:

sympy already does convert 0.1 to 0.1000000000000000, so you'll inevitably  
get
rounding errors (you choosed to use float's, use Rational or Real if you  
expect exact
behavior).

my complain is that the following is very confusing:

In [1]: import math, sympy

In [2]: math.cos(0.1)
Out[2]: 0.99500416527802571

In [3]: sympy.cos(0.1)
Out[3]: cos(0.100000000000000)

I think math does it right, as I would expect that if my argument's are  
float's the
result will be a float. As I said before, you can't expect an exact result  
if you
give a float as an argument. Use Rational if you expect that.

comment to #3:
    not sure about what precision we should use. How do other libraries do
(python.mat, scipy, etc)?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to