Next: 3.2 Constant Interval Arithmetic Up: 3.1 Floating Point Previous: 3.1.5 Argument Reduction

## 3.1.6 Basic Methods

When little information is available on the provided functions, or the provided functions are unsatisfactory, rigorous upper and lower bounds may be computed by resorting to basic methods [22, 47, 29]. The methods employed will depend on the function to be computed, but usually a method for computing can be adapted to compute or .

With a thorough understanding of the method used to compute , an efficient, similar method may be used to compute or . Let us consider the sine function:

Argument reduction may be used, as before, to reduce large angles. Since ,

Since we may infer that x, , and are all non-negative. We may now bound using the provided floating point operations, as follows:

with evaluation proceeding from left to right in both cases. An implementation of and is now clear, for . Using similar bounds on for , and may be evaluated for . A similar implementation of the cosine function for along with appropriate argument reduction allows , , , and to be evaluated for all finite floating-point numbers x. Infinite arguments may be handled by table lookup. The interval based argument reduction presented in the last subsection will correctly handle infinite arguments without table lookup.

Even with limited understanding of the method used to compute , both and may be implemented. Again, we consider the sine function:

Evaluating the approximation formula with an interval arithmetic provides strict bounds on :

An implementation of would compute the interval , as shown above, and return l. An implementation of would return u. The implementation may be extended, as the first was, to allow and to be computed for arbitrary arguments.

Although the two methods initially appear to be distinct, the first implementation of is simply a cleverly optimized version of the second implementation of . Further optimization is possible. For example, one may precompute constants so that division operations may be replaced with multiplication operations:

which mildly reduces the accuracy. In general, interval methods allow one to build and from and , using the method of computing from as a guide. Knowledge of and can help produce good implementations of and .

Next: 3.2 Constant Interval Arithmetic Up: 3.1 Floating Point Previous: 3.1.5 Argument Reduction
 Jeff Tupper March 1996