.TH SIN 2.SH NAMEsin, cos, tan, asin, acos, atan, atan2 \- trigonometric functions.SH SYNOPSIS.B #include <u.h>.br.B #include <libc.h>.PP.Bdouble sin(double x).PP.Bdouble cos(double x).PP.Bdouble tan(double x).PP.Bdouble asin(double x).PP.Bdouble acos(double x).PP.Bdouble atan(double x).PP.Bdouble atan2(double y, double x).SH DESCRIPTION.I Sin, cosand.I tanreturn trigonometric functions of radian arguments.The magnitude of the argument should be checkedby the caller to make sure the result is meaningful..PP.I Asinreturns the arc sine in the range\-π/2 to π/2..PP.I Acosreturns the arc cosine in the range0 to π..PP.I Atanreturns the arc tangent in the range\-π/2 to π/2..PP.I Atan2returns the arc tangent of.I y/xin the range\-π to π..SH SOURCE.B /sys/src/libc/port.SH SEE ALSO.IR intro (2).SH BUGSThe value of.I tanfor arguments greater than about.if t 2\u\s-231\s+2\d.if n 2^31is garbage.
.TH SIN 2
.SH NAME
sin, cos, tan, asin, acos, atan, atan2 \- trigonometric functions
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.PP
.B
double sin(double x)
.PP
.B
double cos(double x)
.PP
.B
double tan(double x)
.PP
.B
double asin(double x)
.PP
.B
double acos(double x)
.PP
.B
double atan(double x)
.PP
.B
double atan2(double y, double x)
.SH DESCRIPTION
.I Sin, cos
and
.I tan
return trigonometric functions of radian arguments.
The magnitude of the argument should be checked
by the caller to make sure the result is meaningful.
.PP
.I Asin
returns the arc sine in the range
\-π/2 to π/2.
.PP
.I Acos
returns the arc cosine in the range
0 to π.
.PP
.I Atan
returns the arc tangent in the range
\-π/2 to π/2.
.PP
.I Atan2
returns the arc tangent of
.I y/x
in the range
\-π to π.
.SH SOURCE
.B /sys/src/libc/port
.SH SEE ALSO
.IR intro (2)
.SH BUGS
The value of
.I tan
for arguments greater than about
.if t 2\u\s-231\s+2\d
.if n 2^31
is garbage.