LOG1P 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

log1pf, log1p, log1pl, log1pw, log1pq, log1pll, log1pdf, log1pd, log1pdl, log1pdll - natural (base-e) logarithm of (1 + argument)

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float log1pf (float x);

extern double log1p (double x);

extern long double log1pl (long double x);

extern __float80 log1pw (__float80 x);

extern __float128 log1pq (__float128 x);

extern long_long_double log1pll (long_long_double x);

extern decimal_float log1pdf (decimal_float x);

extern decimal_double log1pd (decimal_double x);

extern decimal_long_double log1pdl (decimal_long_double x);

extern decimal_long_long_double log1pdll (decimal_long_long_double x);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute the natural (base-e, where e = 2.818281828...) logarithm of 1 + x.

Use this function in preference to log(1 + x) when the magnitude of x is small, to avoid serious accuracy loss.


RETURN VALUES

Return an accurate value of log(1 + x).

ERRORS

If the argument is less than or equal to -1, set errno to EDOM and return a quiet NaN. If the argument is a NaN, set errno to EDOM and return the argument. If the argument is +Infinity, set errno to ERANGE and return the argument.

SEE ALSO

exp(3CW), expm1(3CW), exp2(3CW), exp2m1(3CW), exp8(3CW), exp8m1(3CW), exp10(3CW), exp10m1(3CW), exp16(3CW), exp16m1(3CW), log(3CW), log2(3CW), log21p(3CW), log8(3CW), log81p(3CW), log10(3CW), log101p(3CW), log16(3CW), log161p(3CW).