Updates:
Status: WontFix
Comment #1 on issue 3010 by [email protected]: addiing float to long Integer
should not lose precision in Integer
http://code.google.com/p/sympy/issues/detail?id=3010
The precision of the .5 is 15 digits. The Integer is evaluated to 15
digits, too, and the result, therefore, is not like what you would get from
the Decimal class (exact) it is simply the 15 digit approximation to the
sum. If you look at the intermediate value you will see the approximation:
(S(12345678901234567890)+.5)
1.23456789012346e+19
If I understand correctly, mpmath just tries to assure that the 15 digits
that it returns are correct. And they are in this case. When you try to
make a 20 digit Integer out of this, it fills in the extra digits with
garbage.
--
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.