Comment #17 on issue 1374 by Toon.Verstraelen: simplify(x**2-x**2.0) does
not yield 0.
http://code.google.com/p/sympy/issues/detail?id=1374
I would not go as far as saying that the floating point number 2.0 is
two-digit
representation of anything like 2.01 or 1.97 in a computing context. This
is a
convention for measurements, not for floating point numbers on a computer.
In any
computer language the expression 2.00 == 2.0 evaluates to True and 2.01 ==
2.0
evaluates to False.
I must admit that the following is also confuses me:
In [1]: Real(2.0)==Integer(2)
Out[1]: True
In [2]: x**Real(2.0)==x**Integer(2)
Out[2]: True
In [3]: x**Real(2.0)-x**Integer(2) == 0
Out[3]: False
Given the first two results, I would also think the third one is a bug.
Even without
the simplify.
--
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 [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.