What is sinh in c programming?
sinh in c is a mathematical function which is used to calculate hyperbolic sine of a given number.
This function is defined in math.h header file.
Prototype
double sinh(double y);
Parameters
sinh function takes floating point value as input parameter.
Return value
sinh function returns hyperbolic sine value of a given number.
Example program for sinh in c
#include<stdio.h>
#include<math.h>
int main()
{
double m=0.8,res;
res=sinh(m);
printf("Hyperbolic sine value is %lf \n",res);
return 0;
}
While using gcc use below command to add math header.
gcc file_name.c -lm
Code explanation
The hyperbolic sine value of a given number is found by calling sinh function and the result is being printed onto the console.
Difference between sinh and sin in c
sinh in c is used to find the hyperbolic sine of a given number. sin in c is a mathematical function that is used to find sine of a given number.
Prototypes are as follows
double sinh(double y);
double sin(double y);
sinh( ) | sin( ) |
Used to find hyperbolic sine of given number. | Used to find sine of a given number. |
double sinh(double y); | double sin(double y); |
Difference between sinh and cosh in c
sinh in c is used to find hyperbolic sine of given number. cosh in c is used to find hyperbolic cosine of given number.
Prototypes are as follows
double sinh(double y);
double cosh(double y);
sinh( ) | cosh( ) |
Used to find hyperbolic sine of given number. | Used to find hyperbolic cosine of given number. |
double sinh(double y); | double cosh(double y); |
Difference between sinh and tanh in c
sinh in c is used to find the hyperbolic sine of a given number. tanh in c is used to find the hyperbolic tangent of a given number.
Prototypes are as follows
double sinh(double y);
double tanh(double y);
sinh( ) | tanh( ) |
Used to find hyperbolic sine of given number. | Used to find hyperbolic tangent of given number. |
double sinh(double y); | double tanh(double y); |
People also ask for
What is sinh in c?
sinh in c is a mathematical function that is used to calculate the hyperbolic sine of a given number.