Learn and Learn

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

GoLang – Find Zero Order Bessel – Y0() Function – Examples & Explanation

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

Syntax of Y0() Function in Go Language

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

 

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

Y0() function will returns the order-zero Bessel function of the second kind.

 

GoLang Y0() Function Example 1


Output:
NaN

 

GoLang Y0() Function Example 2


Output:
-0.3180357988225622

 

GoLang Y0() Function Example 3


Output:
0.1271925685821837

 

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