Techieindoor

Go – How to get the inverse hyperbolic sine of number

Here, We will learn how to get the inverse hyperbolic sine of number in go. We can get it by using Asinh() function in math package in go golang.

Function prototype:

func Asinh(num float64) float64

Return value:

Asinh() function in math package returns
the inverse hyperbolic sine of number

Example with code:

package main

import (
  "fmt"
  "math"
)

func main() {

   no := math.Asinh(0)
  fmt.Printf("%.2f\n", no)
	
  no = math.Asinh(1)
  fmt.Printf("%.2f\n", no)
	
  no = math.Asinh(0.75)
  fmt.Printf("%.2f\n", no)
	
  no = math.Asinh(2)
  fmt.Printf("%.2f\n", no)
}

Output:

0.00
0.88
0.69
1.44

To learn more about golang, Please refer given below link:

https://www.techieindoor.com/go-lang-tutorial/

References:

https://golang.org/doc/
https://golang.org/pkg/
Exit mobile version