C Tutorial/math.h/log
log
Item Value Header file math.h Declaration float logf(float num);double log(double num);long double logl(long double num); Return returns the natural logarithm for num.
#include <math.h>
#include <stdio.h>
int main(void)
{
double val = 1.0;
do {
printf("%f %f\n", val, log(val));
val++;
} while (val<11.0);
return 0;
}