DragonFly On-Line Manual Pages
LOG(3) DragonFly Library Functions Manual LOG(3)
log, logf, logl, log10, log10f, log2, log2f, log1p, log1pf -- logarithm
Math Library (libm, -lm)
The log() and logf() functions compute the natural logarithm of x.
The log10() and log10f() functions compute the logarithm base 10 of x,
while log2() and log2f() compute the logarithm base 2 of x.
The log1p() and log1pf() functions compute the natural logarithm of 1 +
x. Computing the natural logarithm as log1p(x) is more accurate than
computing it as log(1 + x) when x is close to zero.
These functions return the requested logarithm; the logarithm of 1 is +0.
An attempt to take the logarithm of +-0 results in a divide-by-zero
exception, and -infinity is returned. Otherwise, attempting to take the
logarithm of a negative number results in an invalid exception and a
return value of NaN.
exp(3), ilogb(3), math(3), pow(3)
The log(), logf(), log10(), log10f(), log2(), log2f(), log1p(), and
log1pf() functions conform to ISO/IEC 9899:1999 (``ISO C99'').
DragonFly 3.5 December 21, 2011 DragonFly 3.5