PHP asin() Function

Definition and Usage

The asin() function returns the arcsine of different values, and the result is a radian value between -PI/2 and PI/2.

Syntax

asin(x)
Parameter Description
x Required. A number, ranging between -1 and 1.

Description

returns x arcsine value, in radians. asin() is sin() inverse function, which means that each value within the asin() range is a==sin(asin(a)).

if x is outside the range of -1 to 1, it returns -1.#IND. If it is 1, it returns the value of PI/2.

Example

In this example, we will calculate the arcsine of different values:

<?php
echo(asin(0.64));
echo(asin(0));
echo(asin(-1));
echo(asin(1));
echo(asin(2))
?>

Output:

0.694498265627
0
-1.57079632679
1.57079632679
-1.#IND