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

Home » Public Forums » archive » IDL is not accurate enough!
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 is not accurate enough! [message #62563 is a reply to message #62508] Mon, 15 September 2008 02:37 Go to previous messageGo to previous message
noahh.schwartz is currently offline  noahh.schwartz
Messages: 10
Registered: February 2008
Junior Member
On 11 sep, 16:44, pgri...@gmail.com wrote:
> pgri...@gmail.com wrote:
>> noahh.schwa...@gmail.com wrote:
>>> On 28 ao t, 18:42, F LDY Lajos <fo...@rmki.kfki.hu> wrote:
>>>> On Thu, 28 Aug 2008, noahh.schwa...@gmail.com wrote:
>>>> > Hi,
>
>>>> > I've been having problems with IDL accuracy. I'm trying to perform
>>>> > calculations using the gamma function. The problem is that it grows
>>>> > VERY fast! Performing this calculation in double (namely gamma(x)/
>>>> > gamma(y) with x and y big) yields the result: NaN...
>>>> > Would it be possible to use a program like 'Mathematica' (or any
>>>> > other) and to plug it in my ILD program? Some kind of CALL_EXTERNAL
>>>> > that is to say. If it is possible, how can I do it and what is the
>>>> > best program to use?
>
>>>> > Thanks,
>>>> >Noah
>
>>>> gamma(x)/gamma(y) => exp(lngamma(x)-lngamma(y))
>
>>>> regards,
>>>> lajos
>
>>> lngamma works fine for my propose! Would you know if an equivalent
>>> function exists for the beselk function? Something like lnbeselk?
>>> beselk(x) for x>709 doesn't seen to work.
>
>> Isn't 0 a good enough approximation?
>
> If not, log(K(x,n))~ln(sqrt(!pi/(2*x)))-x for large x
>
> Paolo
>
>
>
>> Paolo
>
>>> If not, I guess that I'll have to wait for the DLMs that add arbitrary
>>> precision floating point...
>
>>> cheers,
>>> Noah



Hi Paolo,
Your approximation seems to be missing a factor? This is what IDL
gives me:

IDL> x=705d & n=1.1 & print, alog10(beselk(x,n)), (alog(sqrt(!pi/
(2*x)))-x)
-307.50372 -708.05331

Cheers,
Noah
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Maximum index for arrays?
Next Topic: Re: IDL calls C calls IDL?

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

Current Time: Sat Oct 18 10:26:34 PDT 2025

Total time taken to generate the page: 0.96715 seconds