Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Mathematical Library Functionslog1p(3M)


NAME

 log1p - compute natural logarithm

SYNOPSIS

 
cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double log1p(double x);

DESCRIPTION

 

The log1p() function computes loge(1.0 + x). The value of x must be greater than -1.0.

RETURN VALUES

 

Upon successful completion, log1p() returns the natural logarithm of 1.0 + x.

If x is NaN, log1p() returns NaN.

If x is less than -1.0, log1p() returns -HUGE_VAL or NaN and sets errno to EDOM.

If x is -1.0, log1p() returns -HUGE_VAL and may set errno to ERANGE.

For exceptional cases, matherr(3M) tabulates the values to be returned as dictated by Standards other than XPG4.

ERRORS

 

The log1p() function will fail if:

EDOM
The value of x is less than -1.0.

The log1p() function may fail and set errno to:

ERANGE
The value of x is -1.0.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

log(3M), matherr(3M), attributes(5), standards(5)


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.