I am trying to write some code that computes whether a
is less than b
with n-bit tolerance, where a
and b
are double precision variables.
For example, 4.000000001 < 4.00000001
would be TRUE
, but 4.0000000001 < 4.000000001
would be FALSE
. 3.99999999 < 4.00000000
would also be FALSE
. Also note that a
and b
could be negative.