Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pow(3M) — sys5 — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hypot(3M)

matherr(3M)

sinh(3M)

EXP(3M)                              SysV                              EXP(3M)



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

SYNOPSIS
     #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
     exp returns the exponential function of x.

     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 x raised to the power of y.  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(3M), matherr(3M), sinh(3M).

DIAGNOSTICS
     exp returns HUGE_VAL when the correct value would overflow, or 0 when the
     correct value would underflow, and sets errno to ERANGE.

     log and log10 return -HUGE_VAL and set errno to EDOM when x is non-
     positive.

     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.  When the correct value
     for pow would overflow or underflow, pow returns +HUGE_VAL or 0
     respectively, and sets errno to ERANGE.

     sqrt returns 0 and sets errno to EDOM when x is negative.

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

NOTES
     When you link your program to /usr/lib/crt0.o or to
     /usr/apollo/lib/svid/crt0.o, these functions print a message on the
     standard error output upon error:

     o  log and log10 print a message indicating DOMAIN error (or SING error
        when x is 0) when x is non-positive.

     o  pow prints a message indicating DOMAIN error when x is 0 and y is
        non-positive, or when x is negative and y is not an integer.

     o  sqrt prints a message indicating DOMAIN error when x is negative.

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