There is a vast body of literature concerning the implementation of floating point operators [22, 47, 29]; furthertmore, there is literature describing the implementation of correctly rounded floating-point arithmetics [35, 71, 53, 55]. Details concerning the implementation of the floating point system used are not relevant to the current discussion.
We assume that satisfies IEEE standard 754.
The IEEE 754 standard imposes strict requirements on
the rounding of the algebraic operations
+, -,
,
, and
.
An implementation must return the nearest floating
point number to the actual real result, when
an operation is carried out with the rounding mode
set to ``round to nearest''.
This implies that the result is accurate
to within 1/2 ULP, unless underflow or overflow occurs.
Moreover, the algebraic operations must correctly
round the result when the current rounding mode is
``round to
'' or ``round to
'';
this only requires 1 ULP accuracy.
Other operators, such as sine, are not as favoured.
The IEEE 754 standard does not require
return the nearest floating point number to the actual real
result. No claims are made concerning
or
. Some systems assume the current
rounding mode is ``round to nearest'' when sine is computed;
using another rounding mode may adversely
affect the trigonometric computation.
Some brief comments will illustrate how
and
may be constructed from
,
for various classes of functions.
Jeff Tupper | March 1996 |