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

Table of contents


NAME

log21pf, log21p, log21pl, log21pw, log21pq, log21pll, log21pdf, log21pd, log21pdl, log21pdll - base-2 logarithm of (1 + argument)

SYNOPSIS

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

#include <mathcw.h>

extern float log21pf (float x);

extern double log21p (double x);

extern long double log21pl (long double x);

extern __float80 log21pw (__float80 x);

extern __float128 log21pq (__float128 x);

extern long_long_double log21pll (long_long_double x);

extern decimal_float log21pdf (decimal_float x);

extern decimal_double log21pd (decimal_double x);

extern decimal_long_double log21pdl (decimal_long_double x);

extern decimal_long_long_double log21pdll (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 base-2 logarithm of 1 + x.

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


RETURN VALUES

Return an accurate value of log2(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), log1p(3CW), log2(3CW), log8(3CW), log81p(3CW), log10(3CW), log101p(3CW), log16(3CW), log161p(3CW).