Hi, On Sun, Jul 24, 2011 at 2:47 AM, Simon <simonjty...@gmail.com> wrote: > Matthew, I agree that the x + 0.0 case should be treated the same as 1.0 * > x. > I think that the Reals/floats should never automatically (outside of > possible internal routines) be converted to exact numbers. > What happens if you're doing a machine precision calculation that > occasionally reaches exactly 1.0 then gets converted to a slower exact > arithmetic?
Point taken. > I think that the mathematica convention (see below) is the correct one. > > IPython console for SymPy 0.7.0-git (Python 2.7.1-64-bit) (ground types: > python) > In [1]: 1.0 * x > Out[1]: 1.0⋅x > In [2]: x + 0.0 > Out[2]: x > Mathematica 8.0 for Linux x86 (64-bit) > In[1]:= 1.0 * x > Out[1]= 1. x > > In[2]:= x + 0.0 > Out[2]= 0. + x OK - sounds reasonable... Best, Matthew -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.