On Fri, Mar 21, 2014 at 02:57:50PM -0700, Richard Fateman wrote: > The properties that you expect fail because the operations + and * are > incorrect. [...] So there is no issue that the floats are not > rational. Each number is rational. > Your arithmetic is defective unless you work at it.
In [8]: (0.001 + 1.1) - 1.0 Out[8]: 0.10099999999999998 In [9]: 0.001 + (1.1 - 1.0) Out[9]: 0.10100000000000009 [1]> (+ (+ 0.001 (+ 1.1 -1.0))) 0.101000026 [2]> (+ (+ 0.001 1.1) -1.0) 0.10100007 (That's for builtin float's in Python and CL). -- 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/20140322100746.GA21938%40darkstar.order.hcn-strela.ru. For more options, visit https://groups.google.com/d/optout.
