Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/man/2/sin

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.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.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.