Everything

log / logf / logl


Calculates the natural logarithm of a floating-point number.

[Format]

#include <math.h>

double log (double d);

float logf (float d);

long double logl (long double d);

[Parameters]

d Floating-point number for which natural logarithm is to be computed

[Return values]

Normal: Natural logarithm of d

Abnormal: Domain error: Returns not-a-number.

[Remarks]

A domain error occurs if d is negative.

A range error occurs if d is 0.0.