cosh()

cosh ist definiert in der math, die in C über math.h, bzw. in C++ über cmath eingebunden wird.

Funktion

cosh() berechnet den Cosinus Hyperbolicus des übergebenen Parameters. Im Gegensatz zum Cosinus der Kreisfunktion wird hier der Bogen einer an zwei Punkten aufgehängten Kette beschrieben.

Signatur

#include <math.h>
double      cosh( double      x );       
float       cosh( float       x );  // nur C++
long double cosh( long double x );  // nur C++

x: Fläche unter der Hyperbel ausgehend vom Nullpunkt

Return value: Wert des hyperbolischen Kosinus

Beispiel

#include <stdlib.h> // für EXIT_SUCCESS
#include <math.h>   // für cosh
#include <stdio.h>  // für printf()
 
int main( void )
{
  double value;
  double area = log( 2.0 );
 
  value = cosh( area );
 
  printf( "cosh(%f) ist %f\n", area, value );
 
  return EXIT_SUCCESS; 
}

Ausgabe:

cosh(0.693147) ist 1.250000

Hinweis

In C++ wird diese Funktion mit einem ValueArray-Template, sowie einem Complex-Teemplate überschrieben.

siehe auch