acosh(): This function is available in the library math.h.
The acosh() function takes a single argument and returns the arc hyperbolic
cosine of that value in radian.
The acosh() function takes a single mandatory argument that is greater or
equal to 1.
Note: If the argument is less than 1, a domain error occurs.
Example 1: In radians
Input: x = 10.45
Output: 3.03745
Example 2: In degrees
Input: x = 10.45
Output: 174.121
Approach 1: In radians
C++
#include <bits/stdc++.h>using namespace std;int main(){double x = 10.45;cout << acosh(x);return 0;}
Approach 2: In degrees
C++
#include <bits/stdc++.h>using namespace std;int main(){double x = 10.45;double radian = acosh(x);double degrees = radian * 180 / 3.14;cout << degrees << "\n";return 0;}
No comments:
Post a Comment