C Tutorial/math.h/logb — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 10:32, 25 мая 2010

logb

Item Value Header file math.h Declaration float logbf(float num);double logb(double num);long double logbl(long double num); Return returns the exponent of num as a floating-point integer value.


#include <math.h>
  #include <stdio.h>
  int main(void)
  {
    double val = 1.0;
    do {
      printf("%f %f\n", val, logb(val));
      val++;
    } while (val<11.0);
    return 0;
  }