C Tutorial/math.h/cosh

Материал из C\C++ эксперт
Перейти к: навигация, поиск

cosh

Item Value Header file math.h Declaration float coshf(float arg);double cosh(double arg);long double coshl(long double arg); Return returns the hyperbolic cosine of arg.


#include <math.h>
  #include <stdio.h>
  int main(void)
  {
    double val = -1.0;
    do {
      printf("Hyperbolic cosine of %f is %f.\n", val, cosh(val));
      val += 0.1;
    } while(val<=1.0);
    return 0;
  }