A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
I don't understand why intermediate results affect the final results
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
=MOD(0.6*3*25, 1) then the value is 1;
=MOD(0.6*25*3,1) then the value is 0.
Why?
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
I don't understand why intermediate results affect the final results
Illustrated a different way without using MOD:
=LET(Number, 0.6*3*25, IntermediateResult, Number / 1, IntermediateResult - TRUNC(IntermediateResult)) = -7.10542735760100E-15
=LET(Number, 0.6*25*3, IntermediateResult, Number / 1, IntermediateResult - TRUNC(IntermediateResult)) = 0.00000000000000E+00
Kevin
That is the same result I got. But when I looked at the result of the MOD function, that's where the significant digit noise was introduced. So, while the intermediate result appears to not have any noise, it is in there and the MOD function is picking it up.
Kevin
I checked the value as following:
=if(0.6*3*25=45,"yes","no")
It returned yes, which means no rounding issue.
You have run into a rare but real issue of significant digits and rounding. It isn't clear where the significant digit noise is creeping in but it is.
The actual results of the MOD function, when enough significant digits are displayed, are:
| 0.999999999999993000000000000000000000 |
|---|
| 0.000000000000000000000000000000000000 |
Kevin