Learn and Learn

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

GoLang – Find the order-one Bessel – Y1() Function – Examples & Explanation

Y1() function is used to find the order-one Bessel function of the second kind. The standard math package of Go programming language has Y1() function.

Syntax of Y1() Function in Go

The syntax of Y1() 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:
Y1(+Inf) = 0
Y1(0) = -Inf
Y1(x < 0) = NaN
Y1(NaN) = NaN

 

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

Y1() function will return the order-one Bessel function of the second kind.

 

GoLang Y1() Function Example 1


Output:
NaN

 

GoLang Y1() Function Example 2


Output:
-0.06268204062757404

 

GoLang Y1() Function Example 3


Output:
-0.7812128213002887

 

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