#include <math.h>
|
double
cosh (double x); |
float
coshf (float x); |
long double
cosh (long double x); |
#include <math.h> int main( void ) { double pi = 3.1415926535; double x, y; x = pi / 2; y = cosh( x ); printf( "cosh( %f ) = %f\n", x, y ); y = coshf( x ); printf( "coshf( %f ) = %f\n",x, y ); y = coshl( x ); printf( "coshl( %f ) = %f\n",x, y ); }
Output
cosh( 1.570796 ) = 2.509178 coshf( 1.570796 ) = 2.509178 coshl( 1.570796 ) = 2.509178
The cosh function conforms to -isoC.
© 2005-2007 Nokia |