log() and logf()

Syntax
  #include <math.h>

  
  double log (double x);

  
  float  logf(float x);

  
Description

log() computes the natural logarithm of x.

Return

ln(x), if x is greater than zero. If x is smaller then zero, log() returns NAN; if x is equal to zero, log() returns negative infinity. In both cases, log() sets errno to EDOM.

See also

exp() and expf()

log10() and log10f()