Octuple-precision floating-point format

256-bit computer number format

Floating-point formats

IEEE 754

* 16-bit: Half (binary16)
* 32-bit: Single (binary32), decimal32
* 64-bit: Double (binary64), decimal64
* 128-bit: Quadruple (binary128), decimal128
* 256-bit: Octuple (binary256)
* Extended precision

Other

* Minifloat
* bfloat16
* TensorFloat-32
* Microsoft Binary Format
* IBM hexadecimal floating-point
* PMBus Linear-11
* G.711 8-bit floats

Alternatives

* Arbitrary precision
* Block floating point

Tapered floating point

* Posit

* v
* t
* e

Computer architecture bit widths

Bit

* 1
* 4
* 8
* 12
* 16
* 18
* 24
* 26
* 30
* 31
* 32
* 36
* 45
* 48
* 60
* 64
* 128
* 256
* 512
* bit slicing

Application

* 8
* 16
* 32
* 64

Binary floating-point precision

* 16 (×½)
* 24
* 32 (×1)
* 40
* 64 (×2)
* 80
* 128 (×4)
* 256 (×8)

Decimal floating-point precision

* 32
* 64
* 128

* v
* t
* e

In computing, octuple precision is a binary floating-point-based computer number format that occupies 32 bytes (256 bits) in computer memory. This 256-bit octuple precision is for applications requiring results in higher than quadruple precision.

The range greatly exceeds what is needed to describe all known physical limitations within the observable universe or precisions better than Planck units.

## IEEE 754 octuple-precision binary floating-point format: binary256

[edit]

In its 2008 revision, the IEEE 754 standard specifies a binary256 format among the interchange formats (it is not a basic format), as having:

* Sign bit: 1 bit
* Exponent width: 19 bits
* Significand precision: 237 bits (236 explicitly stored)

The format is written with an implicit lead bit with value 1 unless the exponent is all zeros. Thus only 236 bits of the significand appear in the memory format, but the total precision is 237 bits (approximately 71 decimal digits: log10(2237) ≈ 71.344). The bits are laid out as follows:

### Exponent encoding

[edit]

The octuple-precision binary floating-point exponent is encoded using an offset binary representation, with the zero offset being 262143; also known as exponent bias in the IEEE 754 standard.

* Emin = −262142
* Emax = 262143
* Exponent bias = 3FFFF16 = 262143

Thus, as defined by the offset binary representation, in order to get the true exponent the offset of 262143 has to be subtracted from the stored exponent.

The stored exponents 0000016 and 7FFFF16 are interpreted specially.

Exponent | Significand zero | Significand non-zero | Equation

|
|
|

0000016 | 0, −0 | subnormal numbers | (−1)signbit × 2−262142 × 0.significandbits2
0000116, ..., 7FFFE16 | normalized value | (−1)signbit × 2exponent bits2 × 1.significandbits2
7FFFF16 | ±∞ | NaN (quiet, signaling)

The minimum strictly positive (subnormal) value is 2−262378 ≈ 10−78984 and has a precision of only one bit. The minimum positive normal value is 2−262142 ≈ 2.4824 × 10−78913. The maximum representable value is 2262144 − 2261907 ≈ 1.6113 × 1078913.

### Octuple-precision examples

[edit]

These examples are given in bit representation, in hexadecimal, of the floating-point value. This includes the sign, (biased) exponent, and significand.

0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000016 = +0
8000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000016 = −0

7fff f000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000016 = +infinity
ffff f000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000016 = −infinity

0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000116
= 2−262142 × 2−236 = 2−262378
≈ 2.24800708647703657297018614776265182597360918266100276294348974547709294462 × 10−78984
(smallest positive subnormal number)

0000 0fff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff16
= 2−262142 × (1 − 2−236)
≈ 2.4824279514643497882993282229138717236776877060796468692709532979137875392 × 10−78913
(largest subnormal number)

0000 1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000016
= 2−262142
≈ 2.48242795146434978829932822291387172367768770607964686927095329791378756168 × 10−78913
(smallest positive normal number)

7fff efff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff16
= 2262143 × (2 − 2−236)
≈ 1.61132571748576047361957211845200501064402387454966951747637125049607182699 × 1078913
(largest normal number)

3fff efff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff16
= 1 − 2−237
≈ 0.999999999999999999999999999999999999999999999999999999999999999999999995472
(largest number less than one)

3fff f000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000016
= 1 (one)

3fff f000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000116
= 1 + 2−236
≈ 1.00000000000000000000000000000000000000000000000000000000000000000000000906
(smallest number larger than one)

By default, 1/3 rounds down like double precision, because of the odd number of bits in the significand. So the bits beyond the rounding point are `0101...` which is less than 1/2 of a unit in the last place.

## Implementations

[edit]

Octuple precision is rarely implemented since usage of it is extremely rare. Apple Inc. had an implementation of addition, subtraction and multiplication of octuple-precision numbers with a 224-bit two's complement significand and a 32-bit exponent.[1] One can use general arbitrary-precision arithmetic libraries to obtain octuple (or higher) precision, but specialized octuple-precision implementations may achieve higher performance.

### Hardware support

[edit]

There is no known hardware with native support for octuple precision.

## See also

[edit]

* IEEE 754
* ISO/IEC 10967, Language-independent arithmetic
* Primitive data type
* Scientific notation

## References

[edit]

1. ^ Crandall, Richard E.; Papadopoulos, Jason S. (2002-05-08). "Octuple-precision floating point on Apple G4 (archived copy on web.archive.org)" (PDF). Archived from the original on 2006-07-28. (8 pages)

## Further reading

[edit]

* Beebe, Nelson H. F. (2017-08-22). The Mathematical-Function Computation Handbook - Programming Using the MathCW Portable Software Library (1 ed.). Salt Lake City, UT, USA: Springer International Publishing AG. doi:10.1007/978-3-319-64110-2. ISBN 978-3-319-64109-6. LCCN 2017947446.

* v
* t
* e

Data types

Uninterpreted|

* Bit
* Byte
* Trit
* Tryte
* Word
* Bit array

Numeric|

* Arbitrary-precision or bignum
* Complex
* Decimal
* Fixed point
* Block floating point
* Floating point
* Reduced precision
* Minifloat
* Half precision
* bfloat16
* Single precision
* Double precision
* Quadruple precision
* Octuple precision
* Extended precision
* Long double
* Integer
* signedness
* Interval
* Rational

Pointer|

* Address
* physical
* virtual
* Reference

Text|

* Character
* String
* null-terminated

Composite|

* Algebraic data type
* generalized
* Array
* Associative array
* Class
* Dependent
* Equality
* Inductive
* Intersection
* List
* Object
* metaobject
* Option type
* Product
* Record or Struct
* Refinement
* Set
* Union
* tagged

Other|

* Boolean
* Bottom type
* Collection
* Enumerated type
* Exception
* Function type
* Opaque data type
* Recursive data type
* Semaphore
* Stream
* Strongly typed identifier
* Top type
* Type class
* Empty type
* Unit type
* Void

Related
topics|

* Abstract data type
* Boxing
* Data structure
* Generic
* Kind
* metaclass
* Parametric polymorphism
* Primitive data type
* Interface
* Subtyping
* Type constructor
* Type conversion
* Type system
* Type theory
* Variable

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template