asin(): the arc sine (inverse sine) of a given number in radians

<?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))

It takes input range from +1 to -1 , for any other input it returns NAN ( not a number )

deg2rad() with asin()

We can use deg2rad() to convert Degree value to radian and then use asin().
<?Php
echo asin(deg2rad(0)); // 0
echo "<br>";
echo asin(deg2rad(1)); // 0.017454178737585
echo "<br>";
echo asin(deg2rad(-1)); // -0.017454178737585
?>

Example 2: Calculating arcsin for a negative value

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

Example 3: Converting radians to degrees after using asin()

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

Plotting of SIN & SIN curves by using PHP GD function with deg2rad()

Questions

MIN() function
Math Functions
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate 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.



Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer