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

We should reduce dependence on .simplify() on our algorithms, as simplify and variants are slow.

As Integer(2) can easily be coerced into Reals or Floats, Float(2.0) should return Integer(2). I don't see why anyone could need 2.0 as a float. 2 would suffice wherever 2.0 would.
as float * int => float and float + int -> float.

Expressions go out of hand, if we allow things like

      1.0
-x + x
 in our expressions.

The only rationale that the philosophy of 2.0 != 2 and x**2.0 != x**2 has is a purely theoretical one on comment[10]. Comment[17] however invalidates that rationale.

One thing is for sure, making 2.0 return 2 and/or x**2.0 return x**2 will make sympy much faster, and reduce the expression blowup. It is often to see large Exprs in matrix factorizations that eventually all result in zero. Why slow our code by depending on simplify ?


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

Reply via email to