MariaDB ASIN() Function
In MariaDB, ASIN() is a built-in numeric function that returns the arcsine of a given number.
MariaDB ASIN() Syntax
Here is the syntax of the MariaDB ASIN() function:
ASIN(number)
Parameters
number-
Required. A numeric value used to calculate the arcsine.
If you provide the wrong number of parameters, MariaDB will report an error: ERROR 1582 (42000): Incorrect parameter count in the call to native function 'ASIN'.
Return value
The MariaDB ASIN() function returns the arcsine of the specified value.
If the parameter is number not between -1 and 1, the ASIN() function will return NULL.
If the parameter number is NULL, the ASIN() function will return NULL.
MariaDB ASIN() Examples
The following statement shows the basic usage of the MariaDB ASIN() function:
SELECT
ASIN(0.5),
ASIN(0.2),
ASIN(-0.5),
ASIN(-0.2),
ASIN(1),
ASIN(0),
ASIN(-1),
ASIN(2),
ASIN(-2),
ASIN(NULL)\G
Output:
ASIN(0.5): 0.5235987755982989
ASIN(0.2): 0.2013579207903308
ASIN(-0.5): -0.5235987755982989
ASIN(-0.2): -0.2013579207903308
ASIN(1): 1.5707963267948966
ASIN(0): 0
ASIN(-1): -1.5707963267948966
ASIN(2): NULL
ASIN(-2): NULL
ASIN(NULL): NULLConclusion
In MariaDB, ASIN() is a built-in numeric function that returns the arcsine of a given number.