A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/atanh below:

function

<cmath> <ctgmath>

atanh
     double atanh  (double x);      float atanhf (float x);long double atanhl (long double x);
     double atanh (double x);      float atanh (float x);long double atanh (long double x);     double asinh (T x);           // additional overloads for integral types

Compute area hyperbolic tangent

Returns the area hyperbolic tangent of x.

The area hyperbolic tangent is the inverse operation of the hyperbolic tangent.

Header

<tgmath.h>

provides a type-generic macro version of this function.



Parameters
x
Value whose area hyperbolic tangent is computed, in the interval [-1,+1].
If the argument is out of this interval, a domain error occurs.
For values of -1 and +1, a pole error may occur.

Return Value Area hyperbolic tangent of x.

If a domain error occurs:


- And math_errhandling has MATH_ERRNO set: the global variable errno is set to EDOM.
- And math_errhandling has MATH_ERREXCEPT set: FE_INVALID is raised.

If a pole error occurs:


- And math_errhandling has MATH_ERRNO set: the global variable errno is set to ERANGE.
- And math_errhandling has MATH_ERREXCEPT set: FE_DIVBYZERO is raised.

Example
1
2
3
4
5
6
7
8
9
10
11
12
/* atanh example */
#include <stdio.h>      /* printf */
#include <math.h>       /* tanh, atanh */

int main ()
{
  double param, result;
  param = tanh(1);
  result = atanh(param) ;
  printf ("The area hyperbolic tangent of %f is %f.\n", param, result);
  return 0;
}

Output:
The area hyperbolic tangent of 0.761594 is 1.000000.


See also
tanh
Compute hyperbolic tangent (function)
asinh
Compute area hyperbolic sine (function)
acosh
Compute area hyperbolic cosine (function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4