[VA] SRC #012b - Then and Now: Root
|
11-13-2022, 11:23 PM
(This post was last modified: 11-13-2022 11:57 PM by PeterP.)
Post: #19
|
|||
|
|||
RE: [VA] SRC #012b - Then and Now: Root
This is in homage to a lot of learning that I was allowed to do here about polynomial roots, thanks to the ever generous author and Albert Chan.
I tried Barstow’s method as that was something I found on the forum but the hp41 only gets to about 20-30 terms. Not enough. However, given the 10 digit accuracy, the first 100-128 terms should be enough. Thanks to the teachings from Albert, I implemented a root squaring algorithm, looking for the max abs root of 1/P(x). I can get it to run with about 100 terms, given the memory limitations of the HP41CX. Result is 0.806427842 in about 23 seconds. Not very impressive accuracy. More squaring would be required, but I dont have enough registers, and not enough digits of accuracy either I guess. The code first creates the list of 100 or so primes and stores it into registers. And then successively squares them until we get only 3 elements. And then calculates the max abs root by dividing the third element by the first element, taking the (2*number_of_squaring)th root, for the max abs of Q(x) = 1/P(x). 1/x gives then the min abs root. The listings are attached as pictures. I will try to type them up as well, but I am worried about typos. Thank you again for a wonderful learning experience! Cheers Peter Cheers, PeterP |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)