Comment #22 on issue 1321 by [email protected]: trigonometric
functions of floating-point numbers should return floating-point numbers
http://code.google.com/p/sympy/issues/detail?id=1321
I can only answer from the perspective of a user:
When I write f(0.43), say, where f is some specific function, then I expect
to get as answer a real. This is simply because putting in "0.43"
implicitly (for me) means that I am working with approximations. If I
*mean* 43/100, I will write it as such.
If I write f(1/2), then I certainly do not want to get out some random
floating point number. [Currently I would have to write f(Rational(1,2))
for that, but you get my point.]
If I write f(3.0*pi) then this is somewhat borderline. It would make sense
to evaluate it as a real imho, what is wrong with using arg.has(Real)? It
might also make sense not to evaluate it, I don't have a strong opinion
either way.
So, in summary, from the POV of a user:
f(0.5) should evaluate
f(Rational(1,2)) should not evaluate
f(0.5*pi) is sufficiently esoteric to require manual intervention either
way.
That's just my two cents.
--
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.