Can a real number "cover" all integers within its range?
- by macias
Is there a guarantee that a real number (float, double, etc) can "cover" all integers within its range?
By cover I mean, that for every integer within its range there is such real number that this equality holds:
real == int
Or in another example, let's say I have the biggest real number which is smaller than given integer.
When I add "epsilon" will I get this number equal to given integer or bigger than integer?
(I know that among real numbers you should not write comparisons as == for equality, I am simply asking for better understanding subject, not for coding comparisons.)