Is DBL_MIN the smallest positive double?
I'm restricting this answer, perhaps unnecessarily, to IEEE754 floating point.
DBL_MIN
is not allowed to be a subnormal number.
But std::nextafter
is allowed to return a subnormal number.
Hence the return value of the latter could be less than DBL_MIN
.
For more details see https://en.wikipedia.org/wiki/Denormal_number
Is
DBL_MIN
the smallest positive double?
Not certainly.DBL_MIN
is the smallest positive normal double
.
DBL_TRUE_MIN
is the smallest positive double
(since C++17). It will be smaller than DBL_MIN
when double
supports subnormals.