
- The C Standard Library
- C Library - Home
- C Library - <assert.h>
- C Library - <ctype.h>
- C Library - <errno.h>
- C Library - <float.h>
- C Library - <limits.h>
- C Library - <locale.h>
- C Library - <math.h>
- C Library - <setjmp.h>
- C Library - <signal.h>
- C Library - <stdarg.h>
- C Library - <stddef.h>
- C Library - <stdio.h>
- C Library - <stdlib.h>
- C Library - <string.h>
- C Library - <time.h>
- C Standard Library Resources
- C Library - Quick Guide
- C Library - Useful Resources
- C Library - Discussion
- C Programming Resources
- C Programming - Tutorial
- C - Useful Resources
C library function - cosh()
Description
The C library function double cosh(double x) returns the hypebolic cosine of x.
Declaration
Following is the declaration for cosh() function.
double cosh(double x)
Parameters
x − This is the floating point value.
Return Value
This function returns hyperbolic cosine of x.
Example
The following example shows the usage of cosh() function.
#include <stdio.h> #include <math.h> int main () { double x; x = 0.5; printf("The hyperbolic cosine of %lf is %lf\n", x, cosh(x)); x = 1.0; printf("The hyperbolic cosine of %lf is %lf\n", x, cosh(x)); x = 1.5; printf("The hyperbolic cosine of %lf is %lf\n", x, cosh(x)); return(0); }
Let us compile and run the above program to produce the following result −
The hyperbolic cosine of 0.500000 is 1.127626 The hyperbolic cosine of 1.000000 is 1.543081 The hyperbolic cosine of 1.500000 is 2.352410
math_h.htm
Advertisements