Learn and Learn

Learn And Learn - great place for tutorials, references and how-to

GoLang – Find Inverse Hyperbolic Sine – Asinh() Function – Examples & Explanation

Asinh() function is used to find the inverse hyperbolic sine for the given input (x – parameter) in Go language.
The standard math package of Go programming language has Asinh() function. The purpose of this function is to find the inverse of hyperbolic sine function.

Syntax of Asinh() Function in Go Language

The syntax of Asinh() function in Go Language is:

Note: float64 is a data type in Go language which has IEEE-754 64-bit floating-point numbers.
Special cases are:
Asinh(±0) = ±0
Asinh(±Inf) = ±Inf
Asinh(NaN) = NaN

 

Parameters of Asinh() Function in Go Language

x – Where x is any Valid float64 Input value. This parameter is required.

 

Error Handling

If the x parameter is not a number (numeric value) Asinh() function returns an error .
If there is no argument (x – input value) passes to the function, then the compiler will produce an error.

 

Return Value of Asinh() Function in Go Language

Asinh() function will return the inverse hyperbolic sine of the given input(x – parameters).

 

GoLang Asinh() Function Example 1


Output:
4.718578581151767

 

GoLang Asinh() Function Example 2


Output:
0

 

GoLang Asinh() Function Example 3


Output:
-2.7764722807237177

 

Loading...
LearnAndLearn.com © 2018 - All rights reserved