Why do I get an answer like -2.2352 e-10 when I subtract two values that should result in a value of 0?

The first problem is due to the way computers do math. It is virtually impossible for computers to store a value of 1; it may be stored as .9999999 or 1.000001. The only exception to this is when using Integers.

The next problem is caused by the fact that Formula Entry stores constants as double precision numbers. If the value in c0 is in Float format, KaleidaGraph will try to subtract a double precision number from a floating point number. This is going to result in round-off error.

The best way to try and solve this problem is to change the column format of c0 to Double, and then enter the data value. This way both the data in the column and the constant in Formula Entry are stored as double precision numbers. When KaleidaGraph reads the value, it will be treated the same as the constant and a value of zero will result when subtracted.

Scroll to Top