Learn and Learn

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

GoLang – Find Order-n Bessel – Jn() Function – Examples & Explanation

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

Syntax of Jn() Function in Go Language

The syntax of Jn() function in Go Language is:

Note: float64 is a data type in Go language which has IEEE-754 64-bit floating-point numbers. And int is a signed integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, int32.
Special cases are:
Jn(n, ±Inf) = 0
Jn(n, NaN) = NaN

 

Parameters of Jn() Function in Go Language

x – Where x is any Valid int Input value. This parameter is required.
y – Where y is any Valid float64 Input value. This parameter is also required.

 

Error Handling

If the x or y parameter are not numbers (numeric values) Jn() function returns an error .
If there is no argument (x or y – input values) passes to the function, then the compiler will produce an error.

 

Return Value of Jn() Function in Go Language

Jn() function will return the order-n Bessel function of the first kind..

 

GoLang Jn() Function Example 1


Output:
-2.3042847583672514e-08

 

GoLang Jn() Function Example 2


Output:
-0.21774426424195684

 

GoLang Jn() Function Example 3


Output:
9.95121283853212e-06

 

LearnAndLearn.com © 2018 - All rights reserved