When I do a floating point addition I get different results. My database is 32 bit Kognitio. Can some one explain me better why this is a problem when I have my floating point values well within the limits.
I do understand that the operations involving floating point numbers are not always associative due to approximation and rounding errors. But in my case, I haven't used the complete precision of storage.
Below are my trials using a simple select
Good Way!!
2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 4.90000000000000e+000
+ -9.80000000000000e+000
+ -9.80000000000000e+000
--------------------------
0.00000000000000e+000
Bad Way??
-9.80000000000000e+000
+ -9.80000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 2.45000000000000e+000
+ 4.90000000000000e+000
--------------------------
-3.55271367880050e-015