Correct Way to Obtain The Most Negative Double

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):

  • The size of the number is stored in one part of the binary rep
  • The sign of the number is stored in a separate part of the binary rep

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)