shithub: riscv

ref: f8d5cc7230ee2cb7521d90599d525e205ad84fa6
dir: /sys/man/2/sin/

View raw version
.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.