Home » C++ programming language

asinh() function with example in C++

C++ asinh() function: Here, we are going to learn about the asinh() function with example of cmath header in C++ programming language?
Submitted by IncludeHelp, on April 28, 2019

C++ asinh() function

asinh() function is a library function of cmath header, it is used to find the area hyperbolic sine of the given value, it accepts a number (x) and returns the area hyperbolic sine of x.

Syntax of asinh() function:

    asinh(x);

Parameter(s): x – is the number/value whose area hyperbolic sine is calculated.

Return value: double – it returns double type value that is the area hyperbolic sine of the given number/value x.

Example:

    Input:
    float x = 2.45;
    
    Function call:
    asinh(x);    
    
    Output:
    1.6285

C++ code to demonstrate the example of asinh() function

// C++ code to demonstrate the example of 
// asinh() function

#include <iostream>
#include <cmath>
using namespace std;

// main() section
int main()
{
    float x;
    
    x = 1.0;
    cout<<"asinh("<<x<<"): "<<asinh(x)<<endl;

    x = 10.23;
    cout<<"asinh("<<x<<"): "<<asinh(x)<<endl;    

    x = 2.45;
    cout<<"asinh("<<x<<"): "<<asinh(x)<<endl;    
    
    return 0;
}

Output

asinh(1): 0.881374
asinh(10.23): 3.02085
asinh(2.45): 1.6285

Reference: C++ asinh() function







Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.