Is this the correct way to obtain the most negative double in Java?
double v = -Double.MAX_VALUE;
Assuming you mean the largest negative, non-infinite number, sounds correct because, for floating point numbers in 64-bit IEEE 754 floating point (which is what Java uses for doubles):
Therefore: The largest representable negative number would be the same as the largest representable positive number with the sign bit flipped to indicate a negative number.
1.4m articles
1.4m replys
5 comments
57.0k users