<?Php
echo asin(0); // Output is 0
echo "<br>";
echo asin(1); // Output 1.5707963267949
echo "<br>";
echo asin(-1); // Output is -1.5707963267949
echo "<br>";
echo asin(4); // Output is NAN
?>
Syntax
asin(X);
X is the angular value in radian. We get output as ARC SIN of the input angle. It is X==sin(asin(X)) <?Php
echo asin(deg2rad(0)); // 0
echo "<br>";
echo asin(deg2rad(1)); // 0.017454178737585
echo "<br>";
echo asin(deg2rad(-1)); // -0.017454178737585
?>
The *asin()* function can also be used to find the inverse sine of a negative value:
$value = -0.5;
$result = asin($value);
echo "The arcsin of $value is: " . $result;
// Outputs: The arcsin of -0.5 is: -0.5235987755983
To convert the result from radians to degrees:
$value = 0.5;
$radians = asin($value);
$degrees = rad2deg($radians);
echo "The arcsin of $value in degrees is: " . $degrees;
// Outputs: The arcsin of 0.5 in degrees is: 30
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.