LOG(3)

NAME
log, logf - natural logarithms

SYNOPSIS

#include <math.h>

double log(double x);

float logf(float x);

DESCRIPTION

Return the natural logarithm of x, that is, its logarithm base e (where e is the base of the natural system of logarithms, 2.71828...). log and logf are identical save for the return and argument types.

RETURNS

Normally, returns the calculated value. When x is zero, the returned value is -HUGE_VAL and errno is set to ERANGE. When x is negative, the returned value is NaN (not a number) and errno is set to EDOM.

PORTABILITY

log is ANSI. logf is an extension.