C Tutorial/math.h/log
Версия от 14:21, 25 мая 2010; (обсуждение)
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;
}