A
ala
guys anybody tried mod(12,2.4) it results with a wrong value
guys anybody tried mod(12,2.4) it results with a wrong value
Ron Rosenfeld said:How many times are you planning on posting this same issue?
Infinite precision requires a data type with infinite length thus can never beGauss's original definition of mod only applied to integers
http://en.wikipedia.org/wiki/Modulo
which remains the only domain in which computers can use it with full
accuracy unless they have infinite precision (only possible as symbolic
arithmetic, which is outside the scope of Excel).
I do not think it is entirely fair to say MOD fails. It works exactly asHi Jerry,
Does that mean that, provided you only use integers,
the MOD function in excel will not fail in any situation?
....Dave Mills said:Infinite precision requires a data type with infinite length thus can never
be
achieved in a finite world.
....MartinW said:Thanks Jerry,
2^28 is way past anything I will ever require.
If you format the result to 15 decimals (the limit of excel's precision)
then the answer will be returned correctly.
If you format the result to 15 decimals (the limit of excel's precision)
then the answer will be returned correctly.
Jerry W. Lewis said:The interesting aspect of this is that MS apparently
went to great lengths to improve the accuracy of the
result from mod with floating point numbers. In order
to get 4.44089209850063E-16, mod must either use
more that double precision for intermediate calculations