This tool interprets the decimal input as an exact rational number and converts it to IEEE 754 binary32 or binary64. It does not pass through JavaScript number conversion, so you can compare all rounding directions.
Input and format
Examples: 2.35, -0, 1.25e-10, Infinity, NaN
Examples:
Bit representation
Nearest, ties to even
0100000000000010110011001100110011001100110011001100110011001101
Sign (1 bit)Exponent (11 bits)Fraction (52 bits)
Hexadecimal
0x4002CCCCCCCCCCCDClassificationNormal
Unbiased exponent1
Relation to inputGreater than the input
Stored value
Shortest decimal representation
2.35Exact decimal value stored after rounding
2.350000000000000088817841970012523233890533447265625Binary significand
1.0010110011001100110011001100110011001100110011001101The shortest representation is a compact decimal that round-trips to the same value using round-to-nearest, ties-to-even. The exact stored value is not a repeat of the decimal input: it is the complete decimal value represented by the bit pattern after rounding to the selected format.
Rounding direction comparison
Results for double (binary64) (53 bits of precision). Select a row to show its details.
| Rounding direction | Shortest decimal | Relation | Hexadecimal |
|---|---|---|---|
2.35 | Greater than the input | 0x4002CCCCCCCCCCCD | |
2.35 | Greater than the input | 0x4002CCCCCCCCCCCD | |
2.35 | Greater than the input | 0x4002CCCCCCCCCCCD | |
2.3499999999999996 | Less than the input | 0x4002CCCCCCCCCCCC | |
2.3499999999999996 | Less than the input | 0x4002CCCCCCCCCCCC |