Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ trig(S) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     TRIG(S)                   UNIX System V                   TRIG(S)



     Name
          trig: 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 y, x;

     Description
          The sin, cos, and tan functions return respectively the
          sine, cosine, and tangent of their argument, x, measured in
          radians.

          asin returns the arcsine of x, in the range [-/2,/2].

          acos returns the arccosine of x, in the range [0,].

          atan returns the arctangent of x, in the range [-/2,/2].

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

     See Also
          matherr(S)

     Diagnostics
          sin, cos, and tan lose accuracy when their argument is far
          from zero.  For arguments sufficiently large, these
          functions return zero 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 causing partial loss of
          significance, a PLOSS error is generated but no message is
          printed.  In both cases, errno is set to ERANGE.

          If the magnitude of the argument of asin or acos is greater
          than one, or if both arguments of atan2 are zero, zero is
          returned and errno is set 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(S).

     Standards Conformance
          acos, asin, atan, atan2, cos, sin and tan are conformant
          with:
          AT&T SVID Issue 2, Select Code 307-127;
          The X/Open Portability Guide II of January 1987;
          ANSI X3.159-198X C Language Draft Standard, May 13,
          1988;
          IEEE POSIX Std 1003.1-1988 with C Standard Language-
          Dependent System Support;
          and NIST FIPS 151-1.
                                                (printed 6/20/89)

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