5.2 is a Python floating point number (a double) represented as 5854679515581645*2**(-50); using Rational( '5.2' ) it is recognized as exactly 52/10
On Monday, February 3, 2014 4:37:56 PM UTC+1, Rajath Shashidhara wrote: > > > Hello, > > I was checking out some SymPy code. > I have a doubt - > > Rational( 5.2 ) returns 5854679515581645/1125899906842624 > whereas, > Rational( '5.2' ) returns 26/5 > > why is it so? > > Is is designed to work that way? > > -- 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.
