Computer Science, asked by aryanrckz, 10 months ago

what is the difference between double and float in java?​

Answers

Answered by pushpakala086
1

Answer:

Explanation:

  • float is represented in 32 bits, with 1 sign bit, 8 bits of exponent, and 23 bits of the significand (or what follows from a scientific-notation number: 2.33728*1012; 33728 is the significand).
  • double is represented in 64 bits, with 1 sign bit, 11 bits of exponent, and 52 bits of significand.
Answered by Anonymous
1

Answer:

A float gives you approx. 6-7 decimal digits precision while a double gives you approx. 15-16. Also the range of numbers is larger for double. A double needs 8 bytes of storage space while a float needs just 4 bytes. The type float specifies a single-precision value that uses 32 bits of storage.

HOPE IT HELPS U

GOOD NIGHT

Similar questions