754-1985 (R1990) IEEE Standard for Binary Floating-Point Arithmetic 20 pages [1-55937-653-8] [SH10116-NYF] $29.00 * IEEE Mbr: $23.00

All the material that follows, comes from Kevin J. Brewer of Delco Electronics who did so much work to extend Quanfei's page and to develop the pages to convert [ 32-bit ] and [ 64-bit ] IEEE-754 values to floating point. At the end of this page is [ Kevin's Chart ] summarizing the IEEE-754 single and double precision formats.

Scroll up and down from the locations cited below in order to learn other information about the IEEE-754 standard.

The source which showed me that there were actually positive and negative NaNs and introduced me to a new special number, Indeterminate, was [ this page ]. To find the table showing these NaNs and Indeterminate, use the Edit | Find... command on the string "the corresponding values". Scroll up a little in order to take a look at the "Special Operations" table. And right above that table is the list of special numbers and their meanings.The source which introduced me to the concepts of "signaling" and "quiet" NaNs was [ this page ]. To find the section on "signaling" and "quiet" NaNs, use the Edit | Find... command on the string "NaNs can be signaling or quiet".

The source which allowed me to distinguish between "signaling" and "quiet" NaNs was [ this page ]. To find the section on NaNs and the encodings of other special numbers, use the Edit | Find... command on the string "The definition of NaNs".

[ This source ] shows the mathematical equations which define the various IEEE-754 values and ranges.

The source which introduced me to IEEE-754's four rounding modes and the guard, round, and "sticky" bits was [ this page ]. To find the section on rounding, use the Edit | Find... command on the string "four different rounding modes".

Some sources on the Web claim that IEEE-754 specifies four floating-point formats in two groups, basic and extended, with a "single-precision" and a "double-precision" format in each of the two groups. To find this information, use the Edit | Find... command on the string "IEEE 754 specifies four" on [ this page ] and the Edit | Find... command on the string "The other two formats" on [ this page ].

Upon reading the IEEE-754 standard, one learns from "Table 1, Summary of Format Parameters" on page 9 that the extended formats are very loosely defined with unspecified exponential biases and only lower bounds for precisions and exponents, while the basic formats are specified exactly in terms of field widths and semantics. The extended formats are so loosely defined that particular implementations of these formats may be so different that numerical approximation routines using them could be non-portable.

Other sources on the Web claim that IEEE-754 specifies only three floating-point formats, "single-precision", "double-precision", and "quadruple-precision". [ One source ] shows the three IEEE-754 formats and their max and min values in DEC's Fortran-90 documentation. To find the section on the three IEEE-754 formats, use the Edit | Find... command on the string "32-bit IEEE". [ Another source ] shows the encodings of the special numbers and the number of bits in each field for each of the three IEEE-754 formats. To find the sections on the three IEEE-754 formats, use the Edit | Find... command on the string "For single-precision floating point numbers" and start scrolling down.

When comparing the format parameters of "extended double-precision" in IEEE-754's Table 1 and those of the so-called "quadruple-precision", one finds that the "quadruple-precision" format is simply a specific instance of the "extended double-precision" format. Similarly, one will note that "double-precision" is a specific instance of "extended single-precision".

The 80-bit "extended-precision" format is used "internally" by the Intel 80x87 floating-point math "co-processor" in order to be able to shift operands back and forth without any loss of precision in the IEEE-754 64-bit (and 32-bit) format. To find this information, use the Edit | Find... command on the string "it also implements an "extended-precision" format" on [ this page ].

A source which describes the exponential bias of Intel's 80-bit "extended-precision" format and its usage of the additional bits it contains relative to the "double-precision" format is [ this page ]. To find this data, use the Edit | Find... command on the string "In order to help ensure accuracy".

[ This source ] states that Intel's "extended-precision" format supports denormalized (unnormalized) numbers. To find this support information, use the Edit | Find... command on the string "Normalized values provide".

When one compares these stated and implied format parameters of Intel's "extended-precision" with those of "extended double-precision" in Table 1, one finds that the "extended-precision" format is a specific instance of the "extended double-precision" format, similarly to the "quadruple-precision" format.

## Table 1 (Expanded)

Summary of Format Parameters

Parameter Format SingleSingle

ExtendedDoubleDouble

ExtendedQuadruple^{ +}

Extended^{ #}p(precision,

apparent mantissa width in bits)24 ³ 32 53 ³ 64 113 64 Mantissa's MS-Bit hidden bit unspecified hidden bit unspecified hidden bit explicit bit E_{max}+127 ³ +1023 +1023 ³ +16383 +16383 +16383 E_{min}-126 £ -1022 -1022 £ -16382 -16382 -16382 Exponent bias+127 unspecified +1023 unspecified +16383 +16383 Exponent width in bits 8 ³ 11 11 ³ 15 15 15 Format width in bits

(including one bit for sign)32 ³ 43 64 ³ 79 128 80 ## © Copyright 1985 by

## The Institute of Electrical and Electronics Engineers, Inc

^{+ }Although the "quadruple-precision" name and the particular parameters of its format are not specified in the IEEE-754 standard, it is a legally derived IEEE-754 format because its parameters are specific subset elements within the bounds of those specified for the "extended double-precision" format.

^{# }Like the "quadruple-precision" format, Intel's "extended-precision" format is a legal IEEE-754 format derived from the "extended double-precision" format.Other sources on IEEE-754 are:

- [ The University of Hawaii ]
- [ The University of Illinois at Urbana-Champaign ]
- [ The University of Queensland ]
- [ Carleton University ]

## Kevin's Summary Charts

## Storage Layout and Ranges of Floating-Point Numbers

IEEE-754 floating-point numbers require three component fields: the sign, the exponent, and the mantissa. The exponential base is 2 and is never stored in any way with the value in either the registers or memory (it is implied). In order to allow the exponent and mantissa, when taken together, to vary monotonically, the signed exponent is represented in excess-127 unsigned form for single precision and excess-1023 for double precision. This excess-127 (or excess-1023) representation is indicated by the variable "

e" below.Since IEEE-754 floating-point numbers are stored in a

signed magnitudeform, the ranges and binary patterns of the positive and negative numbers are symmetric about the midpoint of the entire range of values (between the positive and negative zeros). As a result, essentially any statement made in regard to the positive numbers is also true of the negative numbers and vice versa.The range of positive floating-point numbers is split into

normalizednumbers which preserve the full precision of the mantissa, including the hidden bit, (24 bits for single precision and 53 bits for double precision) andunnormalizednumbers which have from 1 to 23 significant bits for single precision and 1 to 52 bits for double precision.The number line tables below, which show the layout for single (32-bit) and double (64-bit) precision floating-point numbers and their special values, were inspired by the table on [ this page ]. To find the table on which these two are based, use the Edit | Find... command on the string "the corresponding values". In their column headers, these tables indicate the number of bits in each field along with their bit ranges in square brackets.

The values shown in the

Decimal Rangecolumn of the tables are the end points of their respective ranges with the IEEE-754 round-to-nearest value mode applied. JavaScript uses IEEE-754 double precision floating-point with round-to-nearest value mode to perform all of its arithmetic operations including its input string to numeric conversion routine. Therefore, by default, double (64-bit) precision conversions are automatically rounded to values matching these tables. In order for single (32-bit) precision conversions to be rounded to values matching these tables, the usermustclick theRoundedbutton on those pages where it is present.

## 32-bit Single Precision

Range Name Sign ( s)

1 [31]Exponent ( e)

8 [30-23]Mantissa ( m)

23 [22-0]Hexadecimal Range Range Decimal Range ^{ §}Quiet

-NaN1 11..11 11..11

:

10..01FFFFFFFF

:FFC00001Indeterminate 1 11..11 10..00 FFC00000Signaling

-NaN1 11..11 01..11

:

00..01FFBFFFFF

:FF800001-Infinity

(Negative Overflow)1 11..11 00..00 FF800000< -(2-2 ^{-23}) × 2^{127}£ -3.4028235677973365E+38 Negative Normalized

-1.m× 2^{(e-127)}1 11..10

:

00..0111..11

:

00..00FF7FFFFF

:80800000-(2-2 ^{-23}) × 2^{127}

:

-2^{-126}-3.4028234663852886E+38

:

-1.1754942807573643E-38Negative Unnormalized

-0.m× 2^{(-126)}1 00..00 11..11

:

00..01807FFFFF

:80000001-(1-2 ^{-23}) × 2^{-126}

:

-2^{-149}

(-(1+2^{-52}) × 2^{-150})^{ *}-1.1754942106924411E-38

:

-1.4012984643248170E-45

(-7.0064923216240862E-46)^{ *}Negative Underflow 1 00..00 00..00 80000000-2 ^{-150}

:

< -0-7.0064923216240861E-46

:

< -0-01 00..00 00..00 80000000-0 -0 +00 00..00 00..00 000000000 0 Positive Underflow 0 00..00 00..00 00000000> 0

:

2^{-150}> 0

:

7.0064923216240861E-46Positive Unnormalized

0.m× 2^{(-126)}0 00..00 00..01

:

11..1100000001

:007FFFFF((1+2 ^{-52}) × 2^{-150})^{ *}

2^{-149}

:

(1-2^{-23}) × 2^{-126}(7.0064923216240862E-46) ^{ *}

1.4012984643248170E-45

:

1.1754942106924411E-38Positive Normalized

1.m× 2^{(e-127)}0 00..01

:

11..1000..00

:

11..1100800000

:7F7FFFFF2 ^{-126}

:

(2-2^{-23}) × 2^{127}1.1754942807573643E-38

:

3.4028234663852886E+38+Infinity

(Positive Overflow)0 11..11 00..00 7F800000> (2-2 ^{-23}) × 2^{127}³ 3.4028235677973365E+38 Signaling

+NaN0 11..11 00..01

:

01..117F800001

:7FBFFFFFQuiet

+NaN0 11..11 10..00

:

11..117FC00000

:7FFFFFFF

## 64-bit Double Precision

Range Name Sign ( s)

1 [63]Exponent ( e)

11 [62-52]Mantissa ( m)

52 [51-0]Hexadecimal Range Range Decimal Range ^{ §}Quiet

-NaN1 11..11 11..11

:

10..01FFFFFFFFFFFFFFFF

:FFF8000000000001Indeterminate 1 11..11 10..00 FFF8000000000000Signaling

-NaN1 11..11 01..11

:

00..01FFF7FFFFFFFFFFFF

:FFF0000000000001-Infinity

(Negative Overflow)1 11..11 00..00 FFF0000000000000< -(2-2 ^{-52}) × 2^{1023}£ -1.7976931348623158E+308 Negative Normalized

-1.m× 2^{(e-1023)}1 11..10

:

00..0111..11

:

00..00FFEFFFFFFFFFFFFF

:8010000000000000-(2-2 ^{-52}) × 2^{1023}

:

-2^{-1022}-1.7976931348623157E+308

:

-2.2250738585072016E-308Negative Unnormalized

-0.m× 2^{(-1022)}1 00..00 11..11

:

00..01800FFFFFFFFFFFFF

:8000000000000001-(1-2 ^{-52}) × 2^{-1022}

:

-2^{-1074}

(-(1+2^{-52}) × 2^{-1075})^{ *}-2.2250738585072012E-308

:

-4.9406564584124654E-324

(-2.4703282292062328E-324)^{ *}Negative Underflow 1 00..00 00..00 8000000000000000-2 ^{-1075}

:

< -0-2.4703282292062327E-324

:

< -0-01 00..00 00..00 8000000000000000-0 -0 +00 00..00 00..00 00000000000000000 0 Positive Underflow 0 00..00 00..00 0000000000000000> 0

:

2^{-1075}> 0

:

2.4703282292062327E-324Positive Unnormalized

0.m× 2^{(-1022)}0 00..00 00..01

:

11..110000000000000001

:000FFFFFFFFFFFFF((1+2 ^{-52}) × 2^{-1075})^{ *}

2^{-1074}

:

(1-2^{-52}) × 2^{-1022}(2.4703282292062328E-324) ^{ *}

4.9406564584124654E-324

:

2.2250738585072012E-308Positive Normalized

1.m× 2^{(e-1023)}0 00..01

:

11..1000..00

:

11..110010000000000000

:7FEFFFFFFFFFFFFF2 ^{-1022}

:

(2-2^{-52}) × 2^{1023}2.2250738585072016E-308

:

1.7976931348623157E+308+Infinity

(Positive Overflow)0 11..11 00..00 7FF0000000000000> (2-2 ^{-52}) × 2^{1023}³ 1.7976931348623158E+308 Signaling

+NaN0 11..11 00..01

:

01..117FF0000000000001

:7FF7FFFFFFFFFFFFQuiet

+NaN0 11..11 10..00

:

11..117FF8000000000000

:7FFFFFFFFFFFFFFF

^{§ }Your least significant digits may differ.

^{* }The minimum magnitude values of unnormalized ranges are represented by a single significant bit (a bit whose value is 1) at the right hand end of its format's mantissa. For single (32-bit) and double (64-bit) precision, these minimum range values are 1.4012984643248170E-45 and 4.9406564584124654E-324 respectively. The values 7.0064923216240862E-46 and 2.4703282292062328E-324 are each a little more than half of these minima. They are represented by one significant bit to the right of their format's storable mantissa and another 1-bit spaced the double precision's mantissa width to the right of the first bit. Then, as a result of the IEEE-754 round-to-nearest value mode's operation, these values are rounded to the unnormalized range minimum values.

[ Convert Decimal Floating-Point Numbers to IEEE-754 Hexadecimal Representations. ]

[ Convert IEEE-754 32-bit Hexadecimal Representations to Decimal Floating-Point Numbers. ]

[ Convert IEEE-754 64-bit Hexadecimal Representations to Decimal Floating-Point Numbers. ]

[ CS-341 Home Page. ]

[ Dr. Vickery's Home Page. ]

Last modified January 06, 1999