C++ acosh()
Anonymous contributor
Published Dec 17, 2022
Contribute to Docs
The acosh() function returns the arc hyperbolic cosine of the given argument.
Syntax
acosh(n)
The n parameter can be a floating-point value (e.g., a long or double) or an integral type (e.g., an int or bool). n is mandatory and must be greater or equal to 1. Values less than 1 will result in a domain error.
Example
The following example uses the acosh() function to return the arc hyperbolic cosine of 1:
#include <iostream>#include <cmath>int main() {double x = 1;double result;result = std::acosh(x);std::cout << result << " radian" << "\n";}
This results in the following output:
0 radian
Codebyte Example
The codebyte example below uses the acosh() function to take an argument of 1.7 and return the arc hyperbolic cosine:
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn C++ on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours
- Learn C++ — a versatile programming language that’s important for developing software, games, databases, and more.
- Beginner Friendly.11 hours