C Tutorial/math.h/log — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
|
(нет различий)
|
Версия 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;
}