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

Well, we need to be consistent. A floating point number (Real) should either absorb everything that can be evalf'd by default, or nothing. Right now, we have:

In [45]: 3.5*pi
Out[45]: 3.5⋅π

In [46]: sqrt(3.5)
Out[46]: 1.87082869338697

In [47]: 3.5*sqrt(3)
Out[47]:
      ⎽⎽⎽
3.5⋅╲╱ 3

(obviously something like S(1.2)*S(3.4) should work no matter what).

I'm undecided on this. On the one hand, having a floating point number is an explicit thing (as opposed to using exact numbers). On the other hand, you know how I feel about automatic evaluation.

Also, it certainly seems like sin(0.5) should return a number. After all, we try to make functions like sin return a number when given an exact number where the value is known, like

In [48]: sin(pi/2)
Out[48]: 1

I think we should get ness's patch in (if it is ready to go), but ultimately decide on how floating point numbers should work in SymPy.

--
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