Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

matherr(3M)



          TRIG(3M)             INTERACTIVE UNIX System             TRIG(3M)



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

          SYNOPSIS
               #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(3M).

          DIAGNOSTICS
               Sin, cos, and tan lose accuracy when their argument is far
               from zero.  For arguments sufficiently large, these func-
               tions 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,


          Rev. C Software Development Set                            Page 1





          TRIG(3M)             INTERACTIVE UNIX System             TRIG(3M)



               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(3M).












































          Rev. C Software Development Set                            Page 2



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