exp(3) CLIX exp(3)
NAME
exp, log, log10, pow, sqrt - Exponential, logarithm, power, square root
functions
LIBRARY
Standard Math Library (libm.a)
Intergraph Math Library (libmath.a)
Caching Version of exp() Function (libexp_c)
SYNOPSIS
#include <math.h>
double exp(
double x );
double log(
double x );
double log10(
double x );
double pow(
double x ,
double y );
double sqrt(
double x );
PARAMETERS
x An argument of type double
y An argument of type double
DESCRIPTION
The exp() function returns ex.
The log() function returns the natural logarithm of x. The value of x
must be positive.
The log10() function returns the logarithm base ten of x. The value of x
must be positive.
The pow() function returns xy. If x is zero, y must be positive. If x is
negative, y must be an integer.
2/94 - Intergraph Corporation 1
exp(3) CLIX exp(3)
The sqrt() function returns the non-negative square root of x. The value
of x may not be negative.
RETURN VALUES
The exp() function returns HUGE when the correct value would overflow, or
0 when the correct value would underflow, and sets errno to ERANGE.
The log() and log10() functions return -HUGE and set errno to EDOM when x
is nonpositive. A message indicating DOMAIN error (or SING error when x
is 0) is displayed on stderr.
The pow() function returns 0 and sets errno to EDOM when x is 0 and y is
nonpositive, or when x is negative and y is not an integer. In these
cases a message indicating DOMAIN error is displayed on stderr. When the
correct value for pow() would overflow or underflow, pow() returns +HUGE
or 0 respectively, and sets errno to ERANGE.
The sqrt() returns 0 and sets errno to EDOM when x is negative. A message
indicating DOMAIN error is displayed on stderr.
These error-handling procedures may be changed with the function
matherr().
ERRORS
See the RETURN VALUES.
RELATED INFORMATION
Functions: hypot(3), matherr(3), sinh(3)
2 Intergraph Corporation - 2/94