asin()


float asin ( float $arg )

Description

asin() returns the arc sine of $arg in radians. asin() is the complementary function of the sin().

※ available F/W version : all

Parameters

Return values

Returns the arc sine of $arg in radians

Example

<?php
$rad = 1.0;

$val1 = sin($rad);
$val2 = asin($val1);

echo "sin($rad) = $val1\r\n";  // OUTPUT: sin(1) = 0.8414709848079
echo "asin($val1) = $val2\r\n";  // OUTPUT: asin(0.8414709848079) = 1
?>
<?php
// 1.1 is invalid argument for the asin() so it returns NAN (Not A Number)
$val = asin(1.1);
echo "asin(1.1) = $val\r\n";  // OUTPUT: asin(1.1) = NAN
?>

See also

sin()

Remarks

This function is identical to the PHP group’s asin() function.