Float64 is a floating point number with a 64bit precision.
Float64 is also known as:
It is a number bit representation that permits to store/manipulate:
in a computer
It's a logical data type. While your variable may have a float64 data type, the language engine will not store numbers in Float64 all the time because it will be terribly inefficient on a storage level.
Storing numbers in Float64 would be terribly inefficient
Example: The integer number 42 in bit representation
representation | bit |
---|---|
Float 64 | 0100 0000 0100 0101 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 |
Others | |
two’s complement 8-bit | 0010 1010 |
two’s complement 32-bit | 0000 0000 0000 0000 0000 0000 0010 1010 |
packed binary-coded decimal (BCD) | 0100 0010 |
32-bit IEEE-754 floating-point | 0100 0010 0010 1000 0000 0000 0000 0000 |
console.log(Number.MAX_SAFE_INTEGER); // 2^53 - 1
console.log(Number.MIN_SAFE_INTEGER); // (-(2^53 - 1)).