Forum Discussion
zazaz1
Jan 07, 2020Copper Contributor
Strange error when "if" function is used
I'm fighting whit a problem when I use "IF" function in a file like to the one attached... If I write a simple formula like the ones in coloumn "E", the results are ever correct. But, if i use the ...
zazaz1
Jan 07, 2020Copper Contributor
Thank you for your answer.
OK, the file attached is only a simple exemple, but the issue is the same for every file that contain an "IF" function driving any other calculation.
Anyway, I can see that the error is very small and could be "managed" with round function, but in my mind is quite strange that a simple formula like a*100/a-100 return a result different from zero...
SergeiBaklan
Jan 07, 2020Diamond Contributor
You could be surprised, but
=1*(0.5-0.4-0.1)
also doesn't return zero. And that's not Excel only specific. More about this is here
Floating-point arithmetic may give inaccurate results in Excel
Understanding Floating Point Precision, aka “Why does Excel Give Me Seemingly Wrong Answers?”
- zazaz1Jan 08, 2020Copper Contributor
Thank you. Understood.