The safe numbers of a floating point subtype AI-00217/05 1
88-05-23 co WJ
| !standard 03.05.07 (09) 88-05-23 AI-00217/05
!class confirmation 86-11-14
| !status approved by WG9/AJPO 88-02-05
| !status approved by Director, AJPO 88-02-05
| !status approved by WG9/Ada Board 87-12-07
!status approved by Ada Board 87-07-30
!status panel/committee-approved 87-03-16 (reviewed)
!status panel/committee-approved (6-0-0) 86-11-14 (pending editorial review)
!status work-item 86-08-08
!status received 84-03-13
!references AI-00407, AI-00508, 83-00326
!topic The safe numbers of a floating point subtype
!summary 86-12-28
The safe numbers of a floating point subtype are the safe numbers of its base
type.
!question 86-12-28
3.5.7(9) says:
The safe numbers of a [floating point] subtype are those of its
base type.
Shouldn't this say that the safe numbers of a floating point subtype are a
SUBSET of those of its base type?
!response 87-03-13
The statement in 3.5.7(9) is correct because operations on values of a
subtype are defined in terms of operations on safe numbers of the base type.
Therefore, the safe numbers of a subtype should be (and are) the same as the
base type's safe numbers.
Safe numbers are used (in the Standard) to specify the accuracy of real
numeric operations. 4.5.7(8) defines the accuracy of all real numeric
operations in terms of the safe numbers (since the model numbers of a type
are a subset of the safe numbers and the rules for computing with safe
numbers are the same as the rules for computing with model numbers). Since
all numeric operations are declared for types rather than subtypes, these
operations are performed using the safe numbers of the base type, and hence,
in order to define the accuracy of operations on values of a subtype, it was
sufficient (and intended) for the safe numbers of a floating point subtype to
be the same as the safe numbers of its base type.