08/21/2014, 05:25 AM

(08/21/2014, 01:15 AM)jaydfox Wrote: I got rid of the rational coefficients. Essentially, I multiplied the nth polynomial by n!*2^(n-1), then divide through by that same constant when I use the polynomial.

I didn't explain that clearly. (I was in a hurry to post.)

I multiplied the nth polynomial by n!, and skipped the substitution of x with x/2^(n-1). So in the later subst statements, I don't have to put in the factor of 2^(n-1), and I divide the result by n!. If you compare versions 3 and 4, you should be able to get the general idea of the change. I had to change the functions InitPolys, NewtonInterp, SeqPowers2, and SeqPowers2m. The bulk of the changes were in NewtonInterp. Most of the changes in the other functions were just changes to the subst() calls. (Note: I'm quoting the function names from memory, as I'm on a different computer, so forgive me if I didn't spell them exactly right.)

Also, I think I left a function in the code, FactorPoly(n) or something like that, which I was using for debugging. It's probably out of date (i.e., broken), so don't waste time trying to understand it.

~ Jay Daniel Fox