[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: precision loss in besselh, bessely for n > 16
From: |
Ólafur Jens Sigurðsson |
Subject: |
Re: precision loss in besselh, bessely for n > 16 |
Date: |
Mon, 8 Jun 2009 18:29:28 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Jun 05, 2009 at 11:23:05AM +0200, address@hidden wrote:
>
> Hello,
> 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 ?
Perheps you will have better luck using the bessel functions from the
gnu scientific library. Octave bindings to that can be found in the
GSL package from octave-forge.
Cheers
Oli