Learn and Learn

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

GoLang – Find Order-one Bessel – J1() Function – Examples & Explanation

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

Syntax of J1() Function in Go Language

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

 

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

J1() function will return the order-one Bessel function of the first kind.

 

GoLang J1() Function Example 1


Output:
0.1591319515363295

 

GoLang J1() Function Example 2


Output:
0.5665116833422654

 

GoLang J1() Function Example 3


Output:
-0.0881339043046677

 

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