PHP asin() Function
Definition and Usage
The asin() function returns the arcsine of different numerical values, and the result is an arc value between -PI/2 and PI/2.
Syntax
asin(x)
Parameter | Description |
---|---|
x | Required. A number, within the range of -1 to 1. |
Description
returns x arcsine value, in radians. asin() is sin() is the inverse function, which means that each value within the range of asin() is a==sin(asin(a)).
if x is outside the range of -1 to 1, then it returns -1.#IND. If it is 1, then 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