Accuracy problem in spreadsheet in Geogebra 5

Kari_Vee shared this problem 1 month ago

It seems that there is a problem in Geogebra 5 spreadsheet in comparisons when the number

is small. The version I have is 5.0.631.0-d

For instance:

=If(-0.00000000121248 < 0, -1, 1) gives 1 instead of the correct -1

The same problem appears in the Algebra-window. However, in the CAS it gives the correct


If(-0.00000000121248<0, -1, 1) -> -1

Constructs like this are used for instance in numerical root-solving called

the bisector algorithm. Due to this problem, it is not possible to trust the result

given by Geogebra.

The same problem seems to be in Geogebra 6, at least in the version I have, namely

6.0.631.0. However, I don't really use the version 6, because I like more the user interface

of Geogebra 5.

I tried changing the rounding to 15 significant figures, but that didn't seem to help.

Comments (3)


An addtion to the previous post: in practise the number to be compared against 0 is the result of some computation, like multiplication or subtraction, but I just wanted to keep this as simple as possible to see where the problem is.

I tried the same example using LibreOffice Calc, which produced the correct result.

Thus, I suspect that the implementation in Geogebra has a too low precision for this kind of

computation, which might be due to an old design decision which is outdated today when the processors

are generally using 64-bit architecture?

Implementing a SIGN-function in Geogebra might help?


sgn() does not help

© 2021 International GeoGebra Institute