Yes. If the implementation defines the range of representable values
as -infinity to +infinity, then all values are representable. Some
values convert exactly to a machine representation, other values
convert to a machine representation that is approximately equal to
the value (so is an inexact conversion).
Not if -infinity and +infinity are valid machine representations.
There are three cases to consider:
0.1 value between DBL_MIN and DBL_MAX
1e-99999 value between zero and DBL_MIN
9e+99999 value between DBL_MAX and infinity
All three cases are not exactly representable (assumes non-decimal
All three numbers are bounded by a pair of machine representations.
Fred J. Tydeman Tydeman Consulting
XXXX@XXXXX.COM Testing, numerics, programming
+1 (775) 358-9748 Vice-chair of J11 (ANSI "C")
Sample C99+FPCE tests: http://www.yqcomputer.com/
Savers sleep well, investors eat well, spenders work forever.