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:

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

Special Values & Bit Patterns

Key values and their exact binary representations:

Format Comparison

See how FP64 compares to other floating-point formats:

Where FP64 Is Used