The ASINH()
function in SQLite calculates the inverse hyperbolic sine of a given numeric value. The result is the value whose hyperbolic sine is the specified number.
Syntax
ASINH(X)
Where X
is the numeric value for which you want to calculate the inverse hyperbolic sine. This value can be any real number (positive, negative, or zero).
The result will be a real number representing the angle in hyperbolic space, in terms of radians.
Example 1
Here’s a quick example to demonstrate how it works:
SELECT ASINH(3);
Output:
1.81844645923207
Example 2
Suppose we have a table t1
with a column num
containing various numeric values, and we want to find the inverse hyperbolic sine of each value.
CREATE TABLE t1 (num REAL);
INSERT INTO t1 (num) VALUES (0), (1), (-1), (2), (-2);
Now, we can use ASINH()
to calculate the inverse hyperbolic sine for each value:
SELECT num, ASINH(num) AS inverse_hyperbolic_sine
FROM t1;
Output:
num inverse_hyperbolic_sine
---- -----------------------
0.0 0.0
1.0 0.881373587019543
-1.0 -0.881373587019543
2.0 1.44363547517881
-2.0 -1.44363547517881
In this example:
- When
num
is0
, the result is0
because the inverse hyperbolic sine of0
is0
. - For
num
values like1
and2
,ASINH()
returns the angle in hyperbolic space in radians. - Negative values, such as
-1
and-2
, yield corresponding negative results.
The ASINH()
function is particularly useful in mathematical and engineering applications where hyperbolic functions are involved, such as in physics and computational fields.