Table of Contents
Previous Section Next Section

log

#include <math.h>float logf(float num);double log(double num);
long double logl(long double num);

logf( ) and logl( ) were added by C99.

The log( ) family of functions returns the natural logarithm for num. A domain error occurs if num is negative. If num is zero, a range error is possible.

Related functions are log10( ) and log2( ).


Table of Contents
Previous Section Next Section