'\"! tbl | mmdoc
'\"macro stdmacro
.if n .pH g3m.trig @(#)trig	40.8 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} trig 3M "Math Libraries" "\&"
.if \nX=1 .ds x} trig 3M "Math Libraries"
.if \nX=2 .ds x} trig 3M "" "\&"
.if \nX=3 .ds x} trig "" "" "\&"
.TH \*(x}
.SH NAME
\f4trig\f2: \f4sin\f1, \f4sinf\f1, \f4cos\f1, \f4cosf\f1, \f4tan\f1, \f4tanf\f1, \f4asin\f1, \f4asinf\f1, \f4acos\f1, \f4acosf\f1, \f4atan\f1, \f4atanf\f1, \f4atan2\f1, \f4atan2f\f1 \- trigonometric functions
.SH SYNOPSIS
\f4cc\f1
[\f2flag\fP \|.\|.\|.] \f2file\fP \|.\|.\|.
\f4\-lm\f1
[\f2library\fP \|.\|.\|.]
.PP
\f4cc \-O \-Ksd\f1
[\f2flag\fP \|.\|.\|.] \f2file\fP \|.\|.\|.
\f4\-J sfm\f1
[\f2library\fP \|.\|.\|.]
.PP
\f4#include <math.h>\f1
.PP
\f4double sin (double x);\f1
.PP
\f4float sinf (float x);\f1
.PP
\f4double cos (double x);\f1
.PP
\f4float cosf (float x);\f1
.PP
\f4double tan (double x);\f1
.PP
\f4float tanf (float x);\f1
.PP
\f4double asin (double x);\f1
.PP
\f4float asinf (float x);\f1
.PP
\f4double acos (double x);\f1
.PP
\f4float acosf (float x);\f1
.PP
\f4double atan (double x);\f1
.PP
\f4float atanf (float x);\f1
.PP
\f4double atan2 (double y, double x);\f1
.PP
\f4float atan2f (float y, float x);\f1
.SH DESCRIPTION
\f4sin\fP,
\f4cos\fP,
and
\f4tan\fP
and the single-precision versions
\f4sinf\fP,
\f4cosf\fP,
and
\f4tanf\fP
return, respectively, the sine, cosine, and tangent of their argument,
.IR x ,
measured in radians.
.PP
\f4asin\fP
and
\f4asinf\fP
return the arcsine of
.IR x ,
in the range [\-\(*p/2,\+\(*p/2].
.PP
\f4acos\fP
and
\f4acosf\fP
return the arccosine of
.IR x ,
in the range [0,\+\(*p].
.PP
\f4atan\fP
and
\f4atanf\fP
return the arctangent of
.IR x ,
in the range (\-\(*p/2,\+\(*p/2).
.PP
\f4atan2\fP
and
\f4atan2f\fP
return the arctangent of
.IR y / x ,
in the range (\-\(*p,\+\(*p],
using the signs of both arguments
to determine the quadrant of the return value.
.SH SEE ALSO
\f4matherr\fP(3M).
.SH DIAGNOSTICS
If the magnitude of the argument of
\f4asin\fP, 
\f4asinf\fP,
\f4acos\fP,
or 
\f4acosf\fP
is greater than 1,
or if both arguments of
\f4atan2\fP or \f4atan2f\fP
are 0,
0 is returned and
\f4errno\fP
is set to
\f4EDOM\f1.
In addition, a message indicating \f4DOMAIN\fP error is
printed on the standard error output.
.PP
Except when the \f4\-Xc\f1 compilation option is used,
these error-handling procedures may be changed with the function
\f4matherr\fP.
When the \f4\-Xa\f1 or \f4\-Xc\f1 compilation options are used,
no error messages are printed.
