Math Sinh Function - C++ Programming Tutorial
C++ Course / Math Functions / Math Sinh Function

Math Sinh Function

BLUF: Mastering Math Sinh Function is a critical step in becoming a proficient C++ developer. This lesson provides a deep dive into the syntax, performance considerations, and real-world applications of this concept.
Key Performance Insight: Math Sinh Function

C++ is renowned for its efficiency. Learn how Math Sinh Function enables low-level control and high-performance computing in the tutorial below.

C++ Math sinh

The function calculates the hyperbolic sine of an angle provided in radians.

Mathematically,

Syntax

Suppose the hyperbolic angle is x:

Example

float sinh(float x);
double sinh(double x);
long double sinh(long double x);
double sinh(integral x);

Parameter

x : The value representing the hyperbolic anle.

Return value

It returns the hyperbolic sine of an angle.

Example 1

Let's see a simple example.

Example

#include <iostream>
#include<math.h>
using namespace std;
int main()
{
   int x=90;
   float radian=x*3.14/180;
   std::cout << "Value of degree is: " << x<<std::endl;
   cout<<"sinh(radian): "<<sinh(radian);
    return 0;
}

Output:

Output

Value of degree is: 90
sinh(radian): 2.2993

In this instance, the sinh function calculates the hyperbolic sine of a 90-degree angle and provides a result of 2.2993.

Example 2

Let's see another simple example.

Example

#include <iostream>
#include<math.h>
using namespace std;
int main()
{
   float x=56.4;
   float radian=x*3.14/180;
   std::cout << "Value of degree is :" << x<<std::endl;
   cout<<"sinh(radian): "<<sinh(radian);
   return 0;
}

Output:

Output

Value of degree is :56.4
sinh(radian): 1.15046

In this instance, the sinh method calculates the hyperbolic sine of the angle 56.4 and yields the result of 1.15.

Input Required

This code uses input(). Please provide values below:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience