#include <math.h>
double sin(x) double x;
double cos(x) double x;
void sincos(x, s, c) double x, *s, *c;
double tan(x) double x;
double asin(x) double x;
double acos(x) double x;
double atan(x) double x;
double atan2(y, x) double y, x;
double sinpi(x) double x;
double cospi(x) double x;
void sincospi(x, s, c) double x, *s, *c;
double tanpi(x) double x;
double asinpi(x) double x;
double acospi(x) double x;
double atanpi(x) double x;
double atan2pi(y, x) double y, x;
asin() returns the arc sin in the range -\(*p/2 to \(*p/2.
acos() returns the arc cosine in the range 0 to \(*p.
atan() returns the arc tangent of x in the range -\(*p/2 to \(*p/2.
atan2(y,x) and hypot(x,y) (see hypot.3m convert rectangular coordinates (x,y) to polar (r,\(*h); atan2() computes \(*h, the argument or phase, by computing an arc tangent of y/x in the range -\(*p to \(*p. atan2.0.0,0.0 is ±0.0 or ±\(*p, in conformance with 4.3BSD, as discussed in the [a manual with the abbreviation FPOINT].
sinpi(), cospi(), and tanpi() avoid range-reduction issues because their definition sinpi(x)==sin(\(*p*x) permits range reduction that is fast and exact for all x. The corresponding inverse functions compute asinpi(x)==asin(x)/\(*p. Similarly atan2pi(y,x)==atan2(y,x)/\(*p.
These functions handle exceptional arguments in the spirit of ANSI/IEEE Std 754-1985. sin(±\(if), cos(±\(if), tan(±\(if), or asin(x) or acos(x) with |x|>1, return NaN; sinpi(x) et. al. are similar. In addition, asin(), acos(), and atan2() may also set errno and call matherr.3m
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97