What are the differences between the set of Real Numbers and the Java datatype float?
The set of double precision floating point numbers in Java has the following elements:
Integers from 1 to $2^{53}-1$, multiplied by $2^e$ for integers e in some fixed range (which I am too lazy to look up right now).
+Infinity and -Infinity
+NaN and -NaN
+0 and -0.
The last six are not real numbers (+0 and -0 are both similar, but not quite the same as the real number 0).
Real numbers which are not Java floating-point numbers are 0, those numbers that are either too large or too small, requiring an integer e outside the allowable range, those that are not integer multiples of a power of two, and those that are integer multiples of a power of two with an integer &gt; $2^{53}$.