32-bit floating point: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(Initial 32-bit floating point page)
 
(Add 'floating point' to be consistent with 64-bit page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''Norsk Data 32-bit single precision format:'''
'''Norsk Data 32-bit single precision floating point format:'''
{|
 
|-
The [[NORD-10]] and the [[ND-100]] could be ordered with either of two different hardware floating point formats, the 32-bit format described on this page, or alternatively with [[48-bit floating point]] hardware.
| bit 31 || (1 bit)  || Sign bit
 
|-
The [[ND-500]] and [[ND-5000 family|ND-5000]] used the 32-bit floating point format for single precision. The ND-100 (or -110, -120) front ends in those systems would normally have come with the 32-bit hardware option in order to be compatible with their 500(0) companion.
| bit 30-22 ||  (9 bits) || Exponent
|-
| bit 21-0 || (22 bits) || Mantissa
|-
|}
Exponent has a bias of +256. (Subtract 256 to get true exponent)


'''Special values for exponent:'''
{|class="wikitable"
{|
!Field !! #Bits !! Purpose
|-
|-
| ''All bits zero except sign bit'': || '''Floating underflow'''.
|bit 31 || 1 ||Sign bit
|-
|-
| ''0 (binary 0, aka 0x00)'': || '''Zero'''. Strictly speaking this is for the ND-500(0). The ND-100 spec says ''floating zero: All 32 bits zero.'' But any ND-100 introduced after the ND-500 would presumably be compatible, if not before.
|bit 30-22 || 9 || Exponent
|-
|-
| bit 21-0 || 22 || Mantissa
|}
|}


Mantissa has an implicit 23th bit of 1 (unless mantissa is 0).
* The mantissa is normalized: 0.5 ≤ ''mantissa'' ≤ 1
This is the 0.5 bit, i.e. mantissa is normalised to be 0.5 < mantissa < 1.0
* The mantissa always has an implicit 23th bit of 1, unless the exponent is zero (see below)
* The decimal point is thus to the left of the implicit 23th bit (before exponent is applied)
* The exponent has a bias of +256 (subtract 256 to get true exponent)
 
'''Special values'''
 
* All bits zero except sign bit: '''Floating underflow'''
* All bits of exponent zero: '''Zero''' (sign bit or mantissa values are ignored)
 
(Strictly speaking the 'exponent zero = zero' is ND-500 only, the ND-100 spec document says ''floating zero: All 32 bits zero.'' But any ND-100 introduced after the ND-500 would presumably be compatible, if not before.)
 
'''Precision'''
* 23 bits or approximately 7 decimal digits
 
'''Range'''
* (2<sup>-256</sup> - 0.5) &le; X &lt; (2<sup>255</sup> - 1) or X = 0
or approximately
* +/- 8.6*10<sup>-78</sup> &lt; X &lt; +/- 5.8*10<sup>76</sup>


Decimal point is thus to the left of the implicit 23th bit.
=== Sources ===
* {{ND-doc|06.014.02}}
* {{ND-doc|05.009.03}}

Latest revision as of 05:27, 25 May 2016

Norsk Data 32-bit single precision floating point format:

The NORD-10 and the ND-100 could be ordered with either of two different hardware floating point formats, the 32-bit format described on this page, or alternatively with 48-bit floating point hardware.

The ND-500 and ND-5000 used the 32-bit floating point format for single precision. The ND-100 (or -110, -120) front ends in those systems would normally have come with the 32-bit hardware option in order to be compatible with their 500(0) companion.

Field #Bits Purpose
bit 31 1 Sign bit
bit 30-22 9 Exponent
bit 21-0 22 Mantissa
  • The mantissa is normalized: 0.5 ≤ mantissa ≤ 1
  • The mantissa always has an implicit 23th bit of 1, unless the exponent is zero (see below)
  • The decimal point is thus to the left of the implicit 23th bit (before exponent is applied)
  • The exponent has a bias of +256 (subtract 256 to get true exponent)

Special values

  • All bits zero except sign bit: Floating underflow
  • All bits of exponent zero: Zero (sign bit or mantissa values are ignored)

(Strictly speaking the 'exponent zero = zero' is ND-500 only, the ND-100 spec document says floating zero: All 32 bits zero. But any ND-100 introduced after the ND-500 would presumably be compatible, if not before.)

Precision

  • 23 bits or approximately 7 decimal digits

Range

  • (2-256 - 0.5) ≤ X < (2255 - 1) or X = 0

or approximately

  • +/- 8.6*10-78 < X < +/- 5.8*1076

Sources