floating point %eps: 2^53+1==2^53 (OK), but (2^53+2)+1 <> (2^53+2) ! (unexpected withholding of bit#-1)
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
Since (at least) Scilab 4.1.2 and still in Scilab 6.0.0, we have:
--> 2^53+1 == 2^53
ans =
T // OK: 1/2^53 < %eps
--> 2^53+2 == 2^53
ans =
F // OK: 2/2^53 >= %eps
BUT:
--> 2^53+2+1==2^53+2
ans =
F // NOK: 1 /(2^53+2) < %eps : THE BUG
Scilab behaves as if there was a withholding bit toogling the true lowest one.
ERROR LOG:
----------
none. Wrong behavior
HOW TO REPRODUCE THE BUG:
-------------------------
1/(2^53+2) < %eps
(2^53+2)+1 == 2^53+2 // Returns %F instead of %T
OTHER INFORMATION:
------------------
This bug may be related to the bug 3768