Go language provides inbuilt support for basic constants and mathematical functions to perform operations on the numbers with the help of the math package. You are allowed to find the arcsine of the specified number with the help of Asin() function provided by the math package. So, you need to add a math package in your program with the help of the import keyword to access the Asin() function.
func Asin(y float64) float64
- If the value of y < -1 or y > 1, then Asin(y) = NaN
- If you pass 0 in this function, then this function will return 0.
Result 1: 1.6 Result 2: -1.6 Result 3: 0.0 Result 4: NaN
1.6 + -1.6 = 0.0