Namespaces
Variants
Views
Actions

log1p

From cppreference.com
< c‎ | numeric‎ | math
Revision as of 18:27, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
log1p
(C99)
(C99)
Power functions
(C99)
(C99)
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
(C99)(C99)(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
Classification
(C99)
(C99)
(C99)
Macro constants
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <math.h>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
float       log1pf( float arg );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td >
double      log1p( double arg );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td >
long double log1pl( long double arg );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> Template:ddcl list end

Computes the natural (base e) logarithm of 1+arg. This function is more precise than the expression log(1+arg) if arg is close to zero.

Parameters

arg - floating point value

Return value

ln(1+arg)

Domain error occurs if arg is negative. NAN is returned in that case.

Range error occurs if arg is 0. -HUGE_VAL is returned in that case.

See also

Template:c/numeric/math/dcl list logTemplate:c/numeric/math/dcl list log10