Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Re: LegendreP error (bug?) in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81206] Re: [mg81183] Re: LegendreP error (bug?) in Mathematica
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 15 Sep 2007 04:17:03 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

This is a precision issue. Use greater precision or rationalize the argument .

LegendreP[200, 43, 4/5] // N

2.9256424676613492*^97

LegendreP[200, 43, 0.8`50]

2.92564246766126564673216*10^97


Bob Hanlon

---- Roman <rschmied at gmail.com> wrote: 
> I confirm the problem. Just as an example,
> 
> In[1] := LegendreP[200, 43, 4/5] // N
> Out[1] = 2.9256424676613492`*^97
> 
> In[2] := LegendreP[200, 43, 0.8]
> Out[2] = 6.151579920980095`*^118
> 
> give strikingly different results! (The former result is accurate.)
> 
> It seems that this problem occurs only for the associated Legendre
> polynomials with large m; for m=0 the numerical result is accurate.
> MathWorld (http://mathworld.wolfram.com/LegendrePolynomial.html) gives
> a recursion relation (Eq. 66) for the associated Legendre polynomials,
> and I was under the impression that this gave stable results. John,
> maybe you can use this recursion relation to get better results, or
> you can call the GNU Scientific Library through MathLink (http://
> www.gnu.org/software/gsl/). Bhuvanesh, I am very curious how you
> explain this behavior.
> 
> Roman.
> 
> 



  • Prev by Date: Re: Input Format
  • Next by Date: Re: rationalize numerator of quotient
  • Previous by thread: Re: LegendreP error (bug?) in Mathematica
  • Next by thread: Re: LegendreP error (bug?) in Mathematica