True
<class 'float'>
<class 'sympy.core.numbers.Rational'>
0.3333333333333333 ; 1/3
0.33333333333333326 ; 1/3
0.33333333333333304 ; 1/3
0.33333333333333215 ; 1/3
0.3333333333333286 ; 1/3
0.3333333333333144 ; 1/3
0.33333333333325754 ; 1/3
0.33333333333303017 ; 1/3
0.3333333333321207 ; 1/3
0.3333333333284827 ; 1/3
0.3333333333139308 ; 1/3
0.3333333332557231 ; 1/3
0.3333333330228925 ; 1/3
0.3333333320915699 ; 1/3
0.3333333283662796 ; 1/3
0.3333333134651184 ; 1/3
0.33333325386047363 ; 1/3
0.33333301544189453 ; 1/3
0.3333320617675781 ; 1/3
0.3333282470703125 ; 1/3
0.33331298828125 ; 1/3
0.333251953125 ; 1/3
0.3330078125 ; 1/3
0.33203125 ; 1/3
0.328125 ; 1/3
0.3125 ; 1/3
0.25 ; 1/3
0.0 ; 1/3
-1.0 ; 1/3
-5.0 ; 1/3
-21.0 ; 1/3
--
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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/0dac566d-9a53-4388-8c16-937269370c1c%40googlegroups.com.
And what about the following code ?The user of Sympy must know that types are different and so that the variable are not the same things. A float is not a rational.
--
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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/94b35738-f6ff-4e72-b82e-7fabed0bd6f8%40googlegroups.com.
For me the fact that 1/3 == S(1)/3 has value True sounds like a bug because 1/3 is a float, and S(1)/3 a rational.
--
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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/96c64d5e-b2f4-4f43-9b17-99ff5b5a9322%40googlegroups.com.
Yes but the set of floats is not even a sub ring of the set of rational numbers.