**Question:**What are Different Hyperbolic Functions in Standard C Library?

**Answer:** We have following hyperbolic functions defined and prototyped in ‘math.h’ header.

double sinh(double angle); double cosh(double angle); double tanh(double angle);

These functions return the hyperbolic sine, hyperbolic cosine and hyperbolic tangent of their arguments respectively. Each function takes angle, in radians, as its argument. Let’s learn to use ‘sinh()’ in a C program below,

/* fp_sinhyperbolic_fun.c -- 'sinh()' returns hyperbolic sine of */ /* angle in radians */ #include <stdio.h> #include <stdlib.h> #include <math.h> int main(void) { double angle, result; printf("User, write in angle ,in radians, whose hyperbolic sine " "to be computed...\n"); scanf("%lf", &angle); /* calling 'sinh()' to compute hyperbolic sine of angle */ result = sinh(angle); printf("hyperbolic sine of \"angle: %lf\" is:%lf\n", angle, result); return 0; }

The sinh() function returns the hyperbolic sine of angle, say x, which is defined mathematically as:

advertisement

advertisement

sinh(x) = (exp(x) - exp(-x)) / 2

Output of the above program follows:

User, write in angle ,in radians, whose hyperbolic sine to be computed... +0.0 hyperbolic sine of "angle: 0.000000" is:0.000000 User, write in angle ,in radians, whose hyperbolic sine to be computed... -0.0 hyperbolic sine of "angle: -0.000000" is:-0.000000 User, write in angle ,in radians, whose hyperbolic sine to be computed... 10 hyperbolic sine of "angle: 10.000000" is:11013.232875 User, write in angle ,in radians, whose hyperbolic sine to be computed... 1000000000000000 hyperbolic sine of "angle: 1000000000000000.000000" is:inf

Observe the last case where output turned out as ‘inf’, short for infinity, for very large angle. Try using other functions to see their outputs.

Become Top Ranker in C Programming Now!

**Sanfoundry Global Education & Learning Series – 1000 C Tutorials.**

If you wish to look at all C Tutorials, go to C Tutorials.

advertisement

**Next Steps:**

- Get Free Certificate of Merit in C Programming
- Participate in C Programming Certification Contest
- Become a Top Ranker in C Programming
- Take C Programming Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

**Related Posts:**

- Apply for C Internship
- Practice Computer Science MCQs
- Apply for Computer Science Internship
- Buy Computer Science Books
- Buy C Books