Chapter Contents |
Previous |
Next |
log1p |
Portability: | C99 |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
DIAGNOSTICS | |
RELATED FUNCTIONS | |
SEE ALSO |
SYNOPSIS |
#include <math.h> double log1p(double x); float log1pf(float x); long double log1pl(long double x);
DESCRIPTION |
log1p
computes the natural
logarithm of one plus its argument x
. This
function is expressed by the relation:
y = ln(1 + x)
x
must be greater than -1.0.
The function name log1pf
should be used
for float
arguments, and log1pl
for long double
arguments.
Alternately, if the header file tgmath.h
is
included, log1p
may be used with any numeric
argument type.
RETURN VALUE |
log1p
returns the natural
logarithm of one plus its argument, provided this value is defined and expressible.
DIAGNOSTICS |
If the argument of log1p
is invalid, it returns -HUGE_VAL
in hexadecimal
floating point, or a NaN in binary floating point. In this case, the run-time
library writes an error message to the standard error file stderr
. log1p(-1.0)
returns
negative infinity in binary floating point.
RELATED FUNCTIONS |
expm1
, log
, log1p
,
_matherb
, _matherr
SEE ALSO |
"Mathematical Functions" in Chapter 2, "Function Categories"
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.