Here, We will learn how to get the arcsine in radians of number in go. We can get it by using Asin() function in math package in go golang.
Function prototype:
func Asin(number float64) float64
Return value:
Asin() function in math package returns
the arcsine, in radians, of number.
Example with code:
package main
import (
"fmt"
"math"
)
func main() {
no := math.Asin(0)
fmt.Printf("%.2f\n", no)
no = math.Asin(1)
fmt.Printf("%.2f\n", no)
no = math.Asin(0.5)
fmt.Printf("%.2f\n", no)
}
Output:
0.00
1.57
0.52
To learn more about golang, Please refer given below link:
https://techieindoor.com/go-lang-tutorial/
References:
https://golang.org/doc/
https://golang.org/pkg/