SQLite ATANH() Function
The SQLite ATANH() function returns inverse hyperbolic tangent of a value. The inverse hyperbolic tangent of x is defined as:
If the argument is not in range [-1, 1], then this function returns NULL.
Syntax
ATANH(x)
Parameters
x |
Required. Specify the value. |
Return Value
Returns the inverse hyperbolic tangent of the value.
Example 1:
The example below shows the usage of ATANH() function.
SELECT ATANH(-1); Result: -Inf SELECT ATANH(-0.5); Result: -0.549306144334055 SELECT ATANH(0); Result: 0.0 SELECT ATANH(0.5); Result: 0.549306144334055 SELECT ATANH(1); Result: Inf
Example 2:
Consider a database table called Sample with the following records:
Data | x |
---|---|
Data 1 | -0.8 |
Data 2 | -0.5 |
Data 3 | 0 |
Data 4 | 0.5 |
Data 5 | 0.8 |
The statement given below can be used to calculate the inverse hyperbolic tangent of records of column x.
SELECT *, ATANH(x) AS ATANH_Value FROM Sample;
This will produce the result as shown below:
Data | x | ATANH_Value |
---|---|---|
Data 1 | -0.8 | -1.09861228866811 |
Data 2 | -0.5 | -0.549306144334055 |
Data 3 | 0 | 0.0 |
Data 4 | 0.5 | 0.549306144334055 |
Data 5 | 0.8 | 1.09861228866811 |
❮ SQLite Functions