FP64 - Double Precision

IEEE 754 double-precision floating point: the gold standard for numerical accuracy

Bit Layout

An FP64 number uses 64 bits divided into three fields:

Sign
S
1 bit
Exponent
E
E
E
E
E
E
E
E
E
E
E
11 bits
Mantissa
52 bits
52 bits

The sign bit determines positive (0) or negative (1). The exponent is stored with a bias of 1023. The mantissa stores 52 bits of fractional precision, with an implicit leading 1 for normal numbers.

Overview

FP64, also known as double precision or simply double, is the highest-precision standard IEEE 754 format in common use. It is the default numeric type in many languages including Python, JavaScript, R, and MATLAB.

With 11 exponent bits, FP64 spans an enormous range, roughly 600 orders of magnitude (from about 10-308 to 10308). The 52 mantissa bits provide approximately 15.9 decimal digits of precision, making it suitable for scientific computing, financial calculations, and any application requiring high accuracy.

In JavaScript, all numbers are FP64 by default (the Number type). In C/C++, it's the double type. In Python, float is actually FP64 (double precision), and numpy.float64 explicitly represents it.

Why "double"? The name "double precision" comes from the fact that FP64 uses twice as many bits as FP32 (single precision). This naming convention dates back to the early days of computing when single precision was the default.

Encoding Rules

Normal Numbers

value = (-1)sign × 2(exponent - 1023) × (1 + mantissa / 252)

The implicit leading 1 gives an effective 53-bit mantissa. The exponent bias of 1023 means a stored value of 1023 represents an actual exponent of 0. The bias is calculated as 2(e-1) - 1, where e is the number of exponent bits (11).

Subnormal Numbers

value = (-1)sign × 2-1022 × (0 + mantissa / 252)

When the stored exponent is 0, the number is subnormal. The implicit leading bit becomes 0 instead of 1, and the exponent is fixed at -1022.

Special Values

Interactive Value Visualizer

Click any bit to flip it, drag the slider, or enter a decimal or hex value. The graphs show how values are distributed across the encoding space.

Note: Due to browser limitations with 64-bit integers, some extreme FP64 values may show slight rounding in the visualizer. The encoding logic is mathematically correct.

Dynamic Range & Precision

PropertyValue
Max Positive (Normal)1.797693135e+308
Min Positive (Normal)2.225073859e-308
Max Subnormal2.225073859e-308
Min Positive (Subnormal)4.940656458e-324
Machine Epsilon (at 1.0)2.220446049e-16
Approx. Decimal Digits~15.6
Exponent Bias1023
Exponent Range2^-1022 to 2^1023
Total Bit Patterns18,446,744,073,709,551,616
Supports InfinityYes
Supports NaNYes

Special Values & Bit Patterns

Key values and their exact binary representations:

ValueBit PatternDecimal
+00 00000000000 00000000000000000000000000000000000000000000000000000
-01 00000000000 0000000000000000000000000000000000000000000000000000-0
Min Subnormal0 00000000000 00000000000000000000000000000000000000000000000000014.940656458e-324
Max Subnormal0 00000000000 11111111111111111111111111111111111111111111111111112.225073859e-308
Min Normal0 00000000001 00000000000000000000000000000000000000000000000000002.225073859e-308
Max Normal0 11111111110 11111111111111111111111111111111111111111111111111111.797693135e+308
+Infinity0 11111111111 0000000000000000000000000000000000000000000000000000+Infinity
-Infinity1 11111111111 0000000000000000000000000000000000000000000000000000-Infinity
NaN0 11111111111 1000000000000000000000000000000000000000000000000000NaN

Format Comparison

See how FP64 compares to other floating-point formats:

PropertyFP64FP32BF16FP16
Total Bits64321616
Sign Bits1111
Exponent Bits11885
Mantissa Bits5223710
Bias102312712715
Max Value1.797693135e+3083.402823466e+383.389531389e+3865504
Min Normal2.225073859e-3081.175494351e-381.175494351e-380.00006103515625
Epsilon2.220446049e-161.192092896e-70.00781250.0009765625
~Decimal Digits~15.7~6.9~2.1~3.0
Has InfinityYesYesYesYes
Has NaNYesYesYesYes
Has SubnormalsYesYesYesYes

Where FP64 Is Used