To find the arcsine, or inverse sine, of a number, we can use the php asin() function.


In php, we can easily use trigonometric functions from the collection of php math functions. These php math functions allow us to perform trigonometry easily.

To find the arcsine of a number, we use the php asin() function.

Below is the php syntax to find the inverse sine of a number.


The input to the asin() function must be a float between -1 and 1. The return value will be a float between -pi/2 and pi/2 radians.

echo asin(0.5); // 0.5235987755982989
echo asin(0); // 0.0
echo asin(-0.75); // -0.848062078981481

Finding the Inverse Sine of a Number in php

Arcsine is defined as the inverse of the sine of a number.

Below, we show that if we pass a number to sin() and then call the php asin() function, we get back the same number.

echo asin(sin(pi()/3)); // 1.0471975511965976
echo pi()/3; // 1.0471975511965976

Hopefully this article has been beneficial for you to understand how to use the asin() function in php to find the arcsine of a number.

Categorized in:


Last Update: February 26, 2024