Re: LegendreP Evaluation Mystery
- To: mathgroup at smc.vnet.net
- Subject: [mg75155] Re: LegendreP Evaluation Mystery
- From: AES <siegman at stanford.edu>
- Date: Wed, 18 Apr 2007 05:12:07 -0400 (EDT)
- Organization: Stanford University
- References: <email@example.com>
In article <evvaqs$95r$1 at smc.vnet.net>, "Antonio" <aneves at gmail.com> wrote: > And it is worse for m=0. Does Mathematica evaluate LegendreP > differently for high n's, why does it take so long? Is there any way Don't know if this will be of any help, but some years ago I was evaluating numerical values of Legendre polynomials for high n (in the 50s to 60s) and encountered round-off errors (or what looked like round-off errors any way) with real arguments, that disappeared when I used rational integer or exact arguments. Example: I wanted to vary the argument by very small steps around Pi. Using Pi, 1.001 Pi, 1.002 Pi, etc gave an obviously noisy sequence of values. Using Pi, (1001 Pi/1000), (1002 Pi/1000) gave a much smoother sequence. I assumed it had something to do with this being a polynomial, and Mathematica switching to some kind of integer arithmetic (???).