normalized ALF (Assotiated Legendre Function)
Marco Caliari
marco.caliari at univr.it
Wed Feb 13 05:47:55 CST 2008
Hi Ben.
This one still gives problems
legendre(151,0)
with an Inf. I would check the line
scale = -scale * (2*m-1);
and try to prevent that scale becomes Inf.
Moreover, I don't understand the limit 255 on n. With the normalizations,
there are no problems for n>255.
Best regards,
Marco
On Tue, 12 Feb 2008, Ben Abbott wrote:
> I've added a check for underflow. This is my first time doing such, so I may
> be quite off on what is commonly accepted as proper.
>
> The method I used detects an underflow for orders greater than 151.
>
> octave:104> result_octave1 = legendre (152, [-1:0.1:1]);
> warning: legendre: results may be unstable for high orders.
>
> I've attached the script.
>
> Ben
>
More information about the Help-octave
mailing list