Ensuring the effect of specifying SMALL AI-00640/04 1
89-10-30 BI WA
| !standard 03.05.09 (05) 89-10-30 AI-00640/04
!standard 03.05.09 (06)
!class binding interpretation 88-12-21
| !status approved by WG9 89-10-27
!status ARG-approved 89-05-15 (reviewed)
!status ARG-approved (10-0-0) 89-02-27 (pending editorial review)
!status work-item 89-01-24
!status received 88-12-21
!references AI-00407, 83-01083
!topic Ensuring the effect of specifying SMALL
!summary 89-01-24
The guaranteed minimum accuracy of operations of a fixed point type is
defined in terms of the model numbers of the fixed point type.
The model numbers of a fixed point constraint that does not include a range
constraint are defined by the delta of the fixed accuracy definition or by
the length clause specifying SMALL, if there is one, and by the range of the
subtype denoted by the type mark.
!question 89-05-15
The two paragraphs defining fixed point model numbers, 3.5.9(5-6), do not
fully characterize the effect of a length clause specifying SMALL. The
problem lies in the last sentence of each of the paragraphs. 3.5.9(5) says:
For the model numbers defined by a fixed point constraint, the
number SMALL is chosen as the largest power of two that is not
greater than the delta of the fixed accuracy definition.
Alternatively, it is possible to specify the value of SMALL by a
length clause (see 13.2), in which case model numbers are
multiples of the specified value. THE GUARANTEED MINIMUM
ACCURACY OF OPERATIONS OF A FIXED POINT TYPE IS DEFINED IN TERMS
OF THE MODEL NUMBERS OF THE FIXED POINT CONSTRAINT THAT FORMS THE
CORRESPONDING REAL TYPE DEFINITION (SEE 4.5.7).
Does not the specification of SMALL also affect the accuracy of these
operations? For example, consider,
type FIXED is delta 0.1 range -100.0 .. 100.0;
for FIXED'SMALL use 0.1;
The model numbers of the fixed point constraint have a SMALL that is a power
of two. Despite the last sentence of 3.5.9(5), is it not the intent that the
guaranteed minimum accuracy of operations of type FIXED be defined in terms
of the model numbers defined by the specified value of SMALL?
Similarly, the effect of a specification of SMALL also seems to have been
overlooked in the last sentence of 3.5.9(6):
For a fixed point constraint that includes a range constraint,
the model numbers comprise zero and all multiples of SMALL whose
Ensuring the effect of specifying SMALL AI-00640/04 2
89-10-30 BI WA
MANTISSA can be expressed using exactly B binary digits, where
the value of B is chosen as the smallest integer number for which
each bound of the specified range is either a model number or
lies at most SMALL distant from a model number. FOR A FIXED
POINT CONSTRAINT THAT DOES NOT INCLUDE A RANGE CONSTRAINT ...,
THE MODEL NUMBERS ARE DEFINED BY THE DELTA OF THE FIXED ACCURACY
DEFINITION AND BY THE RANGE OF THE SUBTYPE DENOTED BY THE TYPE
MARK.
Does not the specification of SMALL for the base type also affect the model
numbers associated with a fixed point constraint that does not include a
range constraint? For example, suppose we write:
subtype SFIX is FIXED delta 1.0;
Is it not intended that the model numbers of SFIX be affected by the length
clause given for FIXED?
!recommendation 89-01-24
The guaranteed minimum accuracy of operations of a fixed point type is
defined in terms of the model numbers of the fixed point type.
For a fixed point constraint that does not include a range constraint, the
model numbers are defined by the delta of the fixed accuracy definition or by
the length clause specifying SMALL, if there is one, and by the range of the
subtype denoted by the type mark.
!discussion 89-01-24
It was clearly intended that the operations of a fixed point type be defined
in terms of the type's model numbers, and since the model numbers are
affected by a length clause specifying SMALL, the last sentence of 3.5.9(5)
should not appear to exclude this effect. Similarly, it was intended that
the model numbers of a fixed point subtype be a subset of the model numbers
of the type, and this is not necessarily the case if the effect of a SMALL
specification is ignored.