The safe numbers for IBM-370 floating point 87-08-06 AI-00314/05 1
| !standard 03.05.07 (09) 87-08-06 AI-00314/05
| !class confirmation 84-11-24
| !status approved by WG9/AJPO 87-07-30
| !status approved by Director, AJPO 87-07-30
| !status approved by Ada Board 87-07-30
!status approved by WG9 87-05-29
!status panel/committee-approved 87-01-19 (reviewed)
!status panel/committee-approved (6-0-0) 86-11-14 (pending editorial review)
!status work-item 86-10-13
!status received 84-11-24
!references 83-00473
!topic The safe numbers for IBM-370 floating point
!summary 86-10-13
The safe and model numbers for IBM-370 32-bit floating point have the
following characteristics:
DIGITS = 6
MANTISSA = 21
EMAX = 84
SAFE_EMAX = 252
!question 86-10-13
What are the safe and model numbers for a machine like the IBM-370 whose
floating point representation is hexadecimal (24 bits, plus sign) with
exponent values ranging from -64 to 63. What are the values of DIGITS,
MANTISSA, EMAX, and SAFE_EMAX for such a machine?
!response 86-10-13
The representation of a 24-bit hexadecimal mantissa is .HHHHHH. Since the
first three bits of the mantissa can be zero, the minimum number of
significant binary digits is 21. According to the formula given in 3.5.7(6),
21 mantissa bits supports 6 decimal digits of accuracy, since log(10)/log(2)
= 3.32, and the integer next above 6*3.32 + 1 is 21.
Given that MANTISSA is 21, the exponent range must be at least 4*21, for a
binary mantissa. The smallest positive floating point number is
16#0.100000#E-64, which is equivalent to 2#0.1#E-(256+3). The largest
positive floating point number is 16#0.FFFFFF#E+63, which is equivalent to
2#0.1...1#E+(252). Since the exponent range for the safe numbers must be
symmetric, the exponent for the largest safe number is min(252, 256+3) = 252.
Hence, the following parameters describe the model and safe numbers for the
32-bit IBM-370 floating point representation:
DIGITS = 6
MANTISSA = 21
EMAX = 84
SAFE_EMAX = 252