comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL's BESELJ returns NAN for small argument and large order
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL's BESELJ returns NAN for small argument and large order [message #88072 is a reply to message #88070] Tue, 18 March 2014 16:47 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
"That's not a bug, it's a feature" :-)

The reason you get a NaN can be found in the help:

ITER
Set this keyword equal to a named variable that will contain the number of iterations performed. If the routine converged, the stored value will be equal to the order N. If X or N are arrays, ITER will contain a scalar representing the maximum number of iterations.
Note: If the routine did not converge for an element of X, the corresponding element of the Result array will be set to the IEEE floating-point value NaN, and ITER will contain the largest order that would have converged for that X value.

So,
IDL> print,beselj(0.1d,103.d, ITER=n)
IDL> print, n ;get n=102

So, the algorithm properly converges for order 102, but not 103+. This is why get a number for your second example.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to cleanup an object with a non-modal widget method
Next Topic: IDLnetURL to test for files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:30:03 PDT 2025

Total time taken to generate the page: 0.00457 seconds