A (maybe noob) question: Let
a = 1234567891234567889998.5
b = 1234567891234567889999.5
Mathematica (v8) yields for
a*0.5 - b*0.5
--> 0. (wrong answer) and
(a - b)*0.5
--> -0.5 (correct answer)
although both expressions a*0.5 - b*0.5 and (a - b)*0.5 are mathematically identical. I set $MinPrecision = 200, to no avail.
Is there a way to get for both analytically identical expressions the same numerical result? In my original mathematical problem I want to compare two representations of the same problem, with one yielding a vast sum over products of binomial coefficients (yielding numerically results of order 10^2^n, for n > 10) with tiny numbers (order 0.1^2^n). Analytically I cannot simplify the expressions.
Thanks a bunch.
Michelle
0.5, you lose the advantages of arbitrary precision, since0.5is a machine precision number. Why not divide the quantities by2instead? – J. M.'s missing motivation Jun 04 '13 at 15:331234567891234567889998.5come from? I mean, is it a real application? Or is it specifically a test of precision? – Mark McClure Jun 04 '13 at 15:571E12 + 1 - 1E12on a ten digit calculator, and it can show up in unexpected ways in numerics. – rcollyer Jun 04 '13 at 17:15