Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (2) — Plan9 4th Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

SIN(2)

NAME

sin, cos, tan, asin, acos, atan, atan2 − trigonometric functions

SYNOPSIS

­#include <u.h>
­#include <libc.h>

double sin(double x)

double cos(double x)

double tan(double x)

double asin(double x)

double acos(double x)

double atan(double x)

double atan2(double y, double x)

DESCRIPTION

­Sin, cos and ­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. 

­Asin returns the arc sine in the range −π/2 to π/2. 

­Acos returns the arc cosine in the range 0 to π. 

­Atan returns the arc tangent in the range −π/2 to π/2. 

­Atan2 returns the arc tangent of ­y/x in the range −π to π. 

SOURCE

­/sys/src/libc/port

SEE ALSO

intro(2)

BUGS

The value of ­tan for arguments greater than about 231 is garbage. 

Plan 9  —  December 11, 1999

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026