TRIG(3M) UNIX Programmer's Manual TRIG(3M) NAME sin, cos, tan, asin, acos, atan, atan2 - trigonometric func- tions SYNOPSIS #include double sin (x) double x; double cos (x) double x; 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 x, y; HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION _S_i_n, _c_o_s and _t_a_n return trigonometric functions of radian arguments. The magnitude of the argument should be checked by the caller to make sure the result is meaningful. _A_s_i_n returns the arc sine in the range -pi/2 to pi/2. _A_c_o_s returns the arc cosine in the range 0 to pi. _A_t_a_n returns the arc tangent of _x in the range -pi/2 to pi/2. _A_t_a_n_2 returns the arc tangent of _y/_x in the range -pi to pi. HARDWARE DEPENDENCIES Series 200/500: The approximate limit for the values returned by these functions is 1.49^8. The algorithms used for all functions except _a_t_a_n_2 are from HP 9000 BASIC. DIAGNOSTICS Arguments of magnitude greater than 1 cause _a_s_i_n and _a_c_o_s to return value 0. For _s_i_n, _c_o_s, _t_a_n, if the argument is out of range of accu- rate calculations, _e_r_r_n_o is set to EDOM and zero is returned.