Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ exp(3M) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hypot(3M)

matherr(3M)

sinh(3M)



EXP(3M)                  DOMAIN/IX SYS5                   EXP(3M)



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

USAGE
     #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 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.

DIAGNOSTICS
     Exp returns HUGE when the correct value would overflow and
     zero when the correct value would underflow.  It also 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



Printed 12/4/86                                             EXP-1







EXP(3M)                  DOMAIN/IX SYS5                   EXP(3M)



     pow would overflow or underflow, pow returns +HUGE or zero,
     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 using the
     function matherr(3M).

NOTE
     User programs that call these routines but do not link with
     libm.a will, instead, reference older routines included in
     /lib/clib.  Support for the old (in clib) routines will be
     discontinued in a future release.  See intro(3M).

RELATED INFORMATION
     hypot(3M), matherr(3M), sinh(3M).



































EXP-2                                             Printed 12/4/86





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