Essential properties

The implementation of a transcendental function balances speed and accuracy. When a mathematical result is neither too large nor too small for the number system, the computed result is accurate to within a few ulps of the correctly rounded result. On some platforms, most results are correctly rounded.

Cos and Sin will satisfy an identity like to within rounding error. But the accuracy constraint is greater than just a limit on rounding error. For example, Cos and Sin never exceed 1. Similarly, Exp is never negative. Also, functions are monotonic where they're supposed to be. That is, if representable numbers x and y are such that , then .

The trigonometric functions are periodic. The real-valued functions sin and cos have period , that is, . The function tan has period . The library functions Sin, Cos, and Tan are periodic, too, but with periods depending on a rounded value of . These functions are perfectly periodic; argument reduction is done without rounding error (see the example "Sin(huge)" on page 228).

On some platforms, the transcendental value is rounded to a wide internal value not representable in any of the platform's floating-point number systems. On these platforms, the singularity of Tan at is never reached. Even though , the value of Tan is less than at the double value just below .

Conventions

The library functions raise just those exception flags that pertain to the result. They can be called in any rounding mode, though on some platforms computation will be carried out with rounding to nearest. Except for those functions whose purpose is to change modes, library functions always restore the rounding mode in the current environment to its state when the function was called.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker