math.Y1() Function in Golang With Examples
Go language provides inbuilt support for basic constants and mathematical functions to perform operations on the numbers with the help of the math package. You can find the order-one Bessel function of the second kind with the help of Y1() function provided by the math package. So, you need to add a math package in your program with the help of the import keyword to access the Y1() function.
func Y1(a float64) float64
- If you pass +Inf in this function like Y1(+Inf), then this function will return 0.
- If you pass 0 in this function like Y1(0), then this function will return -Inf.
- If the value of a<0, then this function will return NaN.
- If you pass NaN in this function like Y1(NaN), then this function will return NaN.
Result 1: NaN Result 2: -0.17501034430039827 Result 3: 0 Result 4: NaN Result 5: 0.2737452414709432 Result 6: -Inf
-0.883 + -0.175 = -1.058