TRIG(3M) — Silicon Graphics
NAME
sin (_lsin), cos (_lcos), tan (_ltan), asin (_latan), acos (_lacos), atan (_latan), atan2 (_latan2) − trigonometric functions
SYNOPSIS
#include <math.h>
float sin (x)
float x;
long float _lsin (x)
long float x;
float cos (x)
float x;
long float _lcos (x)
long float x;
float tan (x)
float x;
long float _ltan (x)
long float x;
float asin (x)
float x;
long float _lasin (x)
long float x;
float acos (x)
float x;
long float _lacos (x)
long float x;
float atan (x)
float x;
long float _latan (x)
long float x;
float atan2 (y, x)
float x, y;
long float _latan2 (y, x)
long float x, y;
DESCRIPTION
Sin (_lsin), cos (_lcos), and tan (_ltan) return respectively the sine, cosine and tangent of their argument, which is in radians.
Asin (_lasin) returns the arcsine of x, in the range −π/2 to π/2.
Acos (_lacos) returns the arccosine of x, in the range 0 to π.
Atan (_latan) returns the arctangent of x, in the range −π/2 to π/2.
Atan2 (_latan2) returns the arctangent of y/x, in the range −π to π, using the signs of both arguments to determine the quadrant of the return value.
DIAGNOSTICS
An invalid argument to any of the math routines raises a floating point exception with the operation MATH, and with _mathfunc_id set to indicate the function causing the exception.
All of the routines check their input for the erroneous values NaN and ∞, raising an exception with the type code set to INVALID_OP_A, and INVALID_OP_F2, respectively.
Arguments of magnitude greater than 1.0 cause asin (_lasin) and acos (_lacos) to raise a floating point exception after setting the type code to DOMAIN_ERROR.
If their argument is too large for accurate range reduction, sin (_lsin), and cos (_lcos) raise a floating point exception with the type code set to CANT_REDUCE_RANGE.
SEE ALSO
Version 2.3 — July 04, 1985