Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ exp(S) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     EXP(S)                    UNIX System V                    EXP(S)



     Name
          exp, log, log10, pow, sqrt - exponential, logarithm, power,
          square root functions

     Syntax
          #include <math.h>

          double exp (x)
          double x;

          double log (x)
          double x;

          double log10 (x)
          double x;

          double pow (x, y)
          double x, y;

          double sqrt (x)
          double x;

     Description
          The exp function returns ex.

          log returns the natural logarithm of x.  The value of x must
          be positive.

          log10 returns the logarithm base ten of x.  The value of x
          must be positive.

          pow returns xy.  If x is zero, y must be positive.  If x is
          negative, y must be an integer.

          sqrt returns the non-negative square root of x.  The value
          of x may not be negative.

     See Also
          hypot(S), matherr(S), sinh(S)

     Diagnostics
          The exp function returns HUGE when the correct value would
          overflow, or 0 when the correct value would underflow, and
          sets errno to ERANGE.

          log and log10 return -HUGE and set errno to EDOM when x is
          non-positive.  A message indicating DOMAIN error (or SING
          error when x is 0) is printed on the standard error output.

          pow returns 0 and sets errno to EDOM when x is 0 and y is
          non-positive, or when x is negative and y is not an integer.
          In these cases a message indicating DOMAIN error is printed
          on the standard error output.  When the correct value for
          pow would overflow or underflow, pow returns _HUGE or 0
          respectively, and sets errno to ERANGE.

          sqrt returns 0 and sets errno to EDOM when x is negative.  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
          exp is conformant with:
          AT&T SVID Issue 2, Select Code 307-127;
          The X/Open Portability Guide II of January 1987;
          IEEE POSIX Std 1003.1-1988 with C Standard Language-
          Dependent System Support;
          and NIST FIPS 151-1.

          log, log10, pow and sqrt 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