Hi all, recently I started using sympy (and immediately fall for it), so this mail may be simply my lack of understanding how sympy internally works. However I found a _strange_ (to me) issue with numerical evaluation:
(ipython console) from sympy import * N(1/3) 0 //integer division, ok N(Rational(1)/Rational(3),20) 0.33333333333333333333 //numerical approximation of 1/3, ok init_session() //for nice latex printing and default variables -- I guess this is what init_session() does?? [...] //standard output pprint(N(1/3)) 0.333333333333333 // why not 0? pprint(N(1/3,100)) 0.3333333333333333148296162562473909929394721984863281250000000000000000000000 000000000000000000000000 // what is happening here?? I'd be grateful if anyone can explain this to me... Cheers, Mark -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c3a412a0-7e30-4b34-8f9d-b521991bd40e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
