Am 06.09.2013 11:48, schrieb Sergey Kirpichev:
On Friday, September 6, 2013 12:52:44 PM UTC+4, Christophe Bal wrote:
It sounds like weird becaus when I type 1/2+3/7, sympy returns 13/14.
This means that sympy knows to workd with exact fractions, I know that
about sympy, but in asin(1/2), 1/2 is seen as a float. Stange ! Isn-t it ?
1/2 is not an exact fraction.
0.5f does happen to be the exact fraction for 1/2.
It's just that Sympy does not know that it is an exact, because it does
not see the symbols 1, /, and 2 (that's already evaluated by Python).
> Rational(1, 2) is.
Agreeding that Rational(1,2) would work as expected :-)
--
You received this message because you are subscribed to the Google Groups
"sympy" 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.
For more options, visit https://groups.google.com/groups/opt_out.