


      TRIG(3M)                    (UNIX 5.0)                   TRIG(3M)



      NAME
           sin, cos, tan, asin, acos, atan, atan2 - trigonometric
           functions

      SYNTAX
           #include <math.h>

           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;

      DESCRIPTION
           Sin, cos and tan return respectively the sine, cosine and
           tangent of their argument, which is in radians.

           Asin returns the arcsine of x, in the range -J/2 to J/2.

           Acos returns the arccosine of x, in the range 0 to J.

           Atan returns the arctangent of x, in the range -J/2 to J/2.

           Atan2 returns the arctangent of y/x, in the range -J to J,
           using the signs of both arguments to determine the quadrant
           of the return value.

      DIAGNOSTICS
           Sin, cos and tan lose accuracy when their argument is far
           from zero.  For arguments sufficiently large, these
           functions return 0 when there would otherwise be a complete
           loss of significance.  In this case a message indicating
           TLOSS error is printed on the standard error output.  For
           less extreme arguments, a PLOSS error is generated but no
           message is printed.  In both cases, errno is set to ERANGE.

           Tan returns HUGE for an argument which is near an odd



      Page 1                                         (73 A2 02MTA REV1)






      TRIG(3M)                    (UNIX 5.0)                   TRIG(3M)



           multiple of J/2 when the correct value would overflow, and
           sets errno to ERANGE.

           Arguments of magnitude greater than 1.0 cause asin and acos
           to return 0 and to set errno to EDOM. In addition, a message
           indicating DOMAIN error is printed on the standard error
           output.

           These error-handling procedures may be changed with the
           function matherr(3M).

      SEE ALSO
           matherr(3M).










































      Page 2                                         (73 A2 02MTA REV1)



