Forum Discussion
Anastasiya T
Dec 22, 2017Copper Contributor
Why Simple Formula Adding Two Cells Won't Work?
Hi. Could you please advise, why so simple formula like =E20+G20 won't work in case if number in cell G20 negative, but same value as in E20? In case of other number combinations it works.
Than...
- Dec 26, 2017
Floating point operations usually give side effect around zero result expected, especially with logical operations. Well known example is
=1*(0.5-0.4-0.1)
which returns -2.78E-17. With this
=(1*(0.5-0.4-0.1)=0) returns FALSE however =( (1+1*(0.5-0.4-0.1))=1) returns TRUE
Anastasiya T
Dec 26, 2017Copper Contributor
Not, of cause it is not so simple. 0, that what I expected it to be, and there was something strange. And actually may be this is not so simple formula as I called it, as in first cell was formula as well. But I just remembered something from years ago, and figured it.
SergeiBaklan
Dec 26, 2017Diamond Contributor
Floating point operations usually give side effect around zero result expected, especially with logical operations. Well known example is
=1*(0.5-0.4-0.1)
which returns -2.78E-17. With this
=(1*(0.5-0.4-0.1)=0) returns FALSE however =( (1+1*(0.5-0.4-0.1))=1) returns TRUE
- Anastasiya TJan 05, 2018Copper Contributor
Hi. Thank you, Sergei!
It looks like what I was getting.
I wonder why changing columns could give regular result?
Thank you!