Table of Contents
Previous Section Next Section

log

#include <cmath>float log(float num);double log(double num);
long double log(long double num);

The log( ) function returns the natural logarithm for num. A domain error occurs if num is negative, and a range error occurs if the argument is zero.

A related function is log10( ).


Table of Contents
Previous Section Next Section