plgndr very old bug?


PeterAptaker
12-11-2002, 11:20 AM
Am I correct?
----------------
Many years ago I think I fixed a bug in plgndr but cannot find anything on the web about it so I will ask ..

x!! (or what every is wanted in eq 6.8.8 NR Forran 2nd ed) seems wrong:

- x!! is NOT the product of odd integers (e.g. 6!! is not 5*3*1)

- x!! is the product of alternating integers (e.g. 6!! =6*4*2)

I believe it is used in F77 and F90 code

For example Mathemtica gives:
x!!= 1, 2, 3, 8, 15, 48 for x=1,2,3,4,5,6

Peter

Saul Teukolsky
12-11-2002, 04:23 PM
Dear Peter,

The notation n!! to denote the product of successive odd integers is very well established, and can be found in many reference books going back a long way in time. While a few sources have extended this to odd or even integers (which is a perfectly sensible thing to do), it is *not* sufficiently widespread that one should regard it is standard.

This is actually all irrelevant in the equation you cite in NR. There we use (2m-1)!!, which is clearly the product of successive odd integers.

Saul Teukolsky

PeterAptaker
12-12-2002, 02:42 AM
Great, I did think it unlikely that NR would give wrong answers.

At the same I was uneasy about the disagreement in documentation definition of !! with my other bible, Mathematica - which as you pointed out has no effect on the result.

Peter