Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: LegendreP & Gauss quad bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25470] Re: LegendreP & Gauss quad bug
  • From: Paul Cally <cally at kronos.maths.monash.edu.au>
  • Date: Mon, 2 Oct 2000 22:26:51 -0400 (EDT)
  • Organization: Monash University
  • References: <8r1a7j$i41@smc.vnet.net> <8r6muk$t2v@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jens-Peer Kuska wrote:

> Hi,
>
> a bug known and discussed several month ago.
>
> Regards
>   Jens
>
> Paul Cally wrote:
> >
> > There is a bug in the V4 implementation of the Legendre function
> > LegendreP, at
> > least in the linux version.
> >

 Thanks for this. I looked back at those notes, (from Abbott, Hanlon,
and Simons),
but no-one seemed to realize that LegendreP is simply giving the WRONG
result for Precision[x]>16.

I emailed wri about this bug. They said they would fix it for the next
version. In the
meantime, here is my temporary workaround:

legendreP[n_, m_, x_] :=
    If[$VersionNumber == 4 && NumberQ[x] &&
        Infinity > Precision[x] > 16, (n!)/(m!)LegendreP[n, m, x],
      LegendreP[n, m, x]]

legendreP[n_,x_]:=legendreP[n,0,x]

Then use legendreP instead of LegendreP.

Paul Cally

--

+--------------------------------------------------------------------------+
|Assoc Prof Paul Cally            |    Ph:  +61 3 9905-4471                |
|Dept of Mathematics & Statistics |    Fax: +61 3 9905-3867                |
|Monash University                |    paul.cally at sci.monash.edu.au        |
|PO Box 28M, Victoria 3800        |                                        |
|AUSTRALIA                        | http://www.maths.monash.edu.au/~cally/ |
+--------------------------------------------------------------------------+





  • Prev by Date: Re: Run[] in background (NT)?
  • Next by Date: Re: minimizing f(x,y) ???!!!!
  • Previous by thread: Re: LegendreP & Gauss quad bug
  • Next by thread: Re: List element manipulation