Skip to main content

IEEE 754 浮動小数点エミュレーター

このエントリーをはてなブックマークに追加

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
Floating-point format
Examples:

Bit representation

Nearest, ties to even

0100000000000010110011001100110011001100110011001100110011001101
Sign (1 bit)Exponent (11 bits)Fraction (52 bits)
Hexadecimal
0x4002CCCCCCCCCCCD
ClassificationNormal
Unbiased exponent1
Relation to inputGreater than the input

Stored value

Shortest decimal representation
2.35
Exact decimal value stored after rounding
2.350000000000000088817841970012523233890533447265625
Binary significand
1.0010110011001100110011001100110011001100110011001101

The 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 directionShortest decimalRelationHexadecimal
2.35Greater than the input0x4002CCCCCCCCCCCD
2.35Greater than the input0x4002CCCCCCCCCCCD
2.35Greater than the input0x4002CCCCCCCCCCCD
2.3499999999999996Less than the input0x4002CCCCCCCCCCCC
2.3499999999999996Less than the input0x4002CCCCCCCCCCCC