Comment #4 on issue 1374 by fredrik.johansson: simplify(x**2-x**2.0) does  
not yield 0.
http://code.google.com/p/sympy/issues/detail?id=1374

It is debatable whether the Integer and Real exponent should be considered
cancellable. Mathematica doesn't think so:

In[1]:= x^2.0 - x^2

           2    2.
Out[1]= -x  + x

In[2]:= Simplify[%]

           2    2.
Out[2]= -x  + x

But I'm not quite sure of the pros and cons.

Changing this should be possible without making Real(2.0) -> Integer(2).  
SymPy
already thinks that

>>> x**2 == x**2.0
True

so the question is why Add and simplify don't already make use of this fact.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to