Re: LegendreP & Gauss quad bug
- To: mathgroup at smc.vnet.net
- Subject: [mg25466] Re: [mg25414] LegendreP & Gauss quad bug
- From: BobHanlon at aol.com
- Date: Sun, 1 Oct 2000 02:44:53 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 9/29/2000 1:57:08 AM, cally at kronos.maths.monash.edu.au writes: >There is a bug in the V4 implementation of the Legendre function >LegendreP, at >least in the linux version. > >I am running Mathematica 4.0 under RedHat 6.2 linux. I have found the >following bug: > >Mathematica 4.0 for Linux >Copyright 1988-1999 Wolfram Research, Inc. > -- Motif graphics initialized -- > >In[1]:= LegendreP[5,2,N[1/3]] > >Out[1]= -10.3704 > >In[2]:= LegendreP[5,2,N[1/3,20]] > >Out[2]= -0.17283950617283951 > >In[3]:= %%/% > >Out[3]= 60. > >=================================== > >LegendreP[n,m,x] appears to work properly if x is a machine precision >number, but if it is higher precision, it gives a result which is out by >EXACTLY the factor m!/n! This error is NOT present in Version 3.0 >running under Digital Unix. > Same results on a Mac. Here is a work around: LegendreP[5, 2, x] /. (x -> N[1/3, 20]) -10.370370370370370370 Rationalize[%] == LegendreP[5, 2, 1/3] True Bob Hanlon