Effect of MACHINE_ROUNDS for underflow DRAFT 870311 AI00238/02 1
 !standard 13.07.03 (03) 870311 AI00238/02
!class ramification 870115 (provisional classification)
!status workitem 870115
!status received 840413
!topic Effect of MACHINE_ROUNDS for underflow
!summary 870118 (DRAFT)
If MACHINE_ROUNDS is TRUE for a floating point type, the result of every
arithmetic operation must be properly rounded even if the result underflows
and cannot be represented as an unnormalized floating point number.
!question 870118 (DRAFT)
13.7.3(3) says for T'MACHINE_ROUNDS:
Yields the value TRUE if every predefined arithmetic operation
on values of the base type of T either returns an exact result
or performs rounding.
Does the term "performs rounding" apply to underflow conditions? For
example, suppose the result of a floating point multiply is just less than
the smallest normalized positive floating point value. Is it permissible for
an implementation to yield 0.0 in such a case and still claim that
MACHINE_ROUNDS is TRUE?
!response 870115 (DRAFT)
A straightforward reading of the definition of MACHINE_ROUNDS implies that if
MACHINE_ROUNDS is true for a floating point type, rounding is performed even
when underflow occurs. For example, consider a machine that uses binary
floating point representation and a type with MACHINE_EMIN = 255. The
result of 2#0.11#E255 / 2.0 can at best be represented as 2#0.011#E255. If
unnormalized floating point representation is not supported, then this result
must be represented as either 0.0 or the smallest positive normalized value,
2#0.1#E255. If rounding is done properly, the result must be the normalized
value, 2#0.1#E255. If 0.0 is produced instead, then MACHINE_ROUNDS must be
FALSE.
 !appendix 870311
*****************************************************************************
!section 13.07.03 (03) Software Leverage, Inc. 840315 8300346
!version 1983
!topic Definition of 'MACHINE_ROUNDS
Does the term "performs rounding" in 13.7.3(3) apply to underflow
conditions? Assume an implementation such that
FLOAT'MACHINE_RADIX = 2,
FLOAT'MACHINE_EMIN = e.
Effect of MACHINE_ROUNDS for underflow DRAFT 870311 AI00238/02 2
The smallest positive representable value is thus 2.0**(e  1). If
the result, r, of a multiplication of two values of the type FLOAT
satisifies
2.0**(e  2) < r < 2.0**(e  1)
(so it is closer to the smallest positive representable value than to
0.0), is it permissible for an implementation to yield 0.0 for such an
underflow and still claim FLOAT'MACHINE_ROUNDS = TRUE?
 *****************************************************************************

 !section 13.07.03 (03) Brian WICHMANN 870217 8300903
 !version 1983
 !topic Obtaining correct values for MACHINE attributes.

 The Numerical Algorithms Group in Oxford, UK have a very extensive test
 package for floating point. It can be used to determine the correct values
 of the attributes, especially in difficult cases such as MACHINE_ROUNDS.