X
xz
In a program, if a double is within 0.0001 from an int, then I treat
it as int. For example, 10.00005 will be treated as int, while 10.001
is not.
I am looking for an algorithm to implement this checking. Anybody
gives an idea?
Thanks.
it as int. For example, 10.00005 will be treated as int, while 10.001
is not.
I am looking for an algorithm to implement this checking. Anybody
gives an idea?
Thanks.