help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: precision loss in besselh, bessely for n > 16


From: Francesco Potorti`
Subject: Re: precision loss in besselh, bessely for n > 16
Date: Mon, 08 Jun 2009 13:20:28 +0200

>I'm running some MatLab codes for Mie theory found in a book, which I
>ported very easily to Octave 3.0.1 on Ubuntu Jaunty 9.04. These codes rely
>on the computation of special Bessel functions, in particular I
>experienced problems (NaN, Inf + Infi) with besselh and bessely due to
>precision loss for order higher than 16. With lower orders the codes
>produced the correct results as with MatLab.
>
>See for example the following command in Octave:
>
>besselh(50,[0.1:0.1:2.0]')
>
>which gives an array with all elements
>Inf + Infi
>
>Note also that the same code on MatLab 2009a (now expired) trial run
>without issues for order up to 50. It would be very important for my
>research to be able to run these codes in Octave for orders of besselh as
>close as those obtained with MatLab. Is there any workaround to improve
>this limit ?

Since no one has answered, I suppose this is a limit of the besselh
implementation in current Octave.  Maybe the Matlab implementation uses
different algorithms for computing besselh depending on the input
parameters.  Why not trying yourself to implement a more robust
algorithm for besselh and contribute it to Octave?

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]