Post Reply 
A digression around VA's SRC #012b
11-26-2022, 11:29 AM
Post: #9
RE: A digression around VA's SRC #012b
(11-25-2022 11:14 PM)Albert Chan Wrote:  Anyway, I removed DOT(A,B) code, and simply do horner's rule.
BTW, I wish we had HORNER, with the extra speed and precision.

I added two extra roots ±1, and solve below polynomial real roots instead.
Last term served only to straighten the curve, to speed up FNROOT a bit.

FNQ(x) = (2 + 3x + 5x^2 + 7x^3 + ... + p(n+1)*x^n) * (1-x) * (1+x)^3

>run
SETUP...DONE           102.86
X1=-.996168277368      177.95
X2=-.999296380168      208.74

I don't like Horner method when dealing with thousands of terms, due to the possible accumulated rounding errors. But it seems it works fine to find the roots here.

Great trick to multiply the polynomial by 1-x, so only the differences of the prime numbers appear. It simplifies a lot.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: A digression around VA's SRC #012b - J-F Garnier - 11-26-2022 11:29 AM



User(s) browsing this thread: 1 Guest(s)