SIN(1) C LIBRARY FUNCTIONS SIN(1) NAME sin, cos, tan, asin, acos, atan, atan2 - trigonometric functions SYNOPSIS 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); INCLUDE FILE math.h DESCRIPTION The trigonometric functions all take double argument and return a double. To compute these function for float arguments, casting to a double must be performed when the function is called. sin() returns the sinus of an angle expressed in radian. cos() returns the cosines of an angle expressed in radian. tan() returns the tangent of an angle expressed in radian. asin() returns the arc sin in the range [-PI/2 , PI/2]. acos() returns the arc cosine in the range [0 , PI]. atan() returns the arc tangent of x in the range [-PI/2 , PI/2]. atan2(y,x) convert rectangular coordinates (x,y) to polar angle by computing an arc tangent of y/x in the range [-PI , PI]. DIAGNOSTICS These functions produce a domain error if called with an argument outside their domain range. The value returned by the function is then system dependent, but the system assigns the value EDOM to errno. A range error occurs when the value to be returned is defined mathematically, but cannot be represented as a double. If the value is to large in magnitude (overflow), then either HUGE_VAL or -HUGE_VAL is returned. If the value is to small in magnitude (underflow), then zero is returned. On overflow, errno is set to ERANGE. SEE ALSO cosh(), exp(), errno.