Learn and Learn

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

GoLang – Find Hyperbolic Sine – Sinh() Function – Examples & Explanation

Sinh() function is used to the hyperbolic sine of the given input (x – parameter) in Go language. The standard math package of Go programming language has Sinh() function.

Syntax of Sinh() Function in Go Laguage

The syntax of Sinh() 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:
Sinh(±0) = ±0
Sinh(±Inf) = ±Inf
Sinh(NaN) = NaN

 

Parameters of Sinh() 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) Sinh() 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 Sinh() Function in Go Language

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

 

GoLang Sinh() Function Example 1


Output:
-2094.044751346617

 

GoLang Sinh() Function Example 2


Output:
7.010406448291578e+23

 

GoLang Sinh() Function Example 3


Output:
1.1752011936438014

 

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