Java's Double
class has members containing the Min and Max value for the type.
2^-1074 <= x <= (2-2^-52)ยท2^1023 // where x is the double.
Check out the Min_VALUE
and MAX_VALUE
static final members of Double
.
(some)People will suggest against using floating point types for things where accuracy and precision are critical because rounding errors can throw off calculations by measurable (small) amounts.