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, NAN is returned; if it is equal to zero, log() returns negative infinity. In both cases, errno is set to EDOM.

See also

exp() and expf() and

log10() and log10f()