How to use atanh() function to get the arc hyperbolic tangent of N in C++

1 Answer

0 votes
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	cout << "atanh(1) = " << atanh(1) << endl;
	cout << "atanh(0) = " << atanh(0) << endl;
	cout << "atanh(0.9) = " << atanh(0.9) << endl;

	return 0;
}

// inf = infinity

/*
run:

atanh(1) = inf
atanh(0) = 0
atanh(0.9) = 1.47222

*/

 



answered Mar 13, 2016 by avibootz
...