next up previous notation contents
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 tex2html_wrap_inline33805 can be adapted to compute tex2html_wrap_inline33801 or tex2html_wrap_inline33803 .

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

math11120

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

math11136

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

math11150

with evaluation proceeding from left to right in both cases. An implementation of tex2html_wrap_inline33797 and tex2html_wrap_inline33799 is now clear, for tex2html_wrap_inline34013 . Using similar bounds on tex2html_wrap_inline32437 for tex2html_wrap_inline34017 , tex2html_wrap_inline33797 and tex2html_wrap_inline33799 may be evaluated for tex2html_wrap_inline34023 . A similar implementation of the cosine function for tex2html_wrap_inline34023 along with appropriate argument reduction allows tex2html_wrap_inline33797 , tex2html_wrap_inline33799 , tex2html_wrap_inline34031 , and tex2html_wrap_inline34033 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 tex2html_wrap_inline33805 , both tex2html_wrap_inline33801 and tex2html_wrap_inline33803 may be implemented. Again, we consider the sine function:

math11120

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

figure11208

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

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

math11238

which mildly reduces the accuracy. In general, interval methods allow one to build tex2html_wrap_inline33801 and tex2html_wrap_inline33803 from tex2html_wrap_inline34071 and tex2html_wrap_inline34073 , using the method of computing tex2html_wrap_inline33805 from tex2html_wrap_inline34077 as a guide. Knowledge of tex2html_wrap_inline32577 and tex2html_wrap_inline34081 can help produce good implementations of tex2html_wrap_inline33801 and tex2html_wrap_inline33803 .


next up previous notation contents
Next: 3.2 Constant Interval Arithmetic Up: 3.1 Floating Point Previous: 3.1.5 Argument Reduction
Jeff TupperMarch 1996