From bug-octave-request at bevo dot che dot wisc dot edu Fri Dec 12 12:52:53 2003 Subject: Re: error in legendre.m for order n=1 From: pkienzle at users dot sourceforge dot net To: Benjamin Schmidt , bug-octave@bevo.che.wisc.edu Date: Fri, 12 Dec 2003 13:56:41 -0000 On 1 Oct 2003 at 8:40, Benjamin Schmidt wrote: > Dear Sirs > > I use Octave Version 2.1.50 for Windows. I encountered an error in the file > > /opt/octave/share/octave/2.1.50/site/m/octave-forge/specfun/legendre.m > (Copyright (C) 2000 Kai Habel) > > When calling the function legendre(1,0) the answer is 0 > -0 > > but it should be > 0 > -1 > > In his file Kai Habel tried to use the exact expansion of the legendre > function for the order n=1 (line 76) but unfortunately made a mistake. The > line should look as follows: L=[x; -sqrt(1 - x .^ 2)]; . Done. Thanks, Paul Kienzle pkienzle at users dot sf dot net ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------