Important: The information in this document is obsolete and should not be used for new development.
Trigonometric Functions
MathLib provides the following trigonometric functions:
Computes the cosine of x. Computes the sine of x. Computes the tangent of x. Computes the arc cosine of x. Computes the arc sine of x. Computes the arc tangent of x. Computes the arc tangent of y/x. The remaining trigonometric functions can be computed easily and efficiently from the transcendental functions provided.
The arguments for trigonometric functions (
cos
,sin
, andtan
) and return values for inverse trigonometric functions (acos
,asin
,atan
, andatan2
) are expressed in radians. The cosine, sine, and tangent functions use an argument reduction based on theremainder
function (see page 6-11 in Chapter 6, "Numeric Operations and Functions") and the constantpi
, wherepi
is the nearest approximation of \x86 with 53 bits of precision. The cosine, sine, and tangent functions are periodic with respect to the constantpi
, so their periods are different from their mathematical counterparts and diverge from their counterparts when their arguments become very large.