Programming exercise (RPL/RPN)  Reciprocal Fibonacci Constant

02202017, 04:41 PM
Post: #47




RE: Programming exercise (RPL/RPN)  Reciprocal Fibonacci Constant
(02182017 04:12 AM)Claudio L. Wrote: While using REVLIST is fine, it's much slower than just adding in reverse order. (02182017 05:11 AM)Paul Dale Wrote: Wouldn't the time for the floating point additions far outweigh the time to reverse the list??? (02192017 02:27 PM)John Keith Wrote: On a physical HP50, REVLIST adds about 10ms for an input of 66, which seems to be the smallest value that gives a correct 12digit result. Seems to me a small price to pay for accuracy. You are both right, my tests revealed (at default 32digit precision): REVLIST for 2000 integers on a list: 5.7 ms INV for 2000 integers on a list: 86 ms ΣLIST for 2000 integers on a list: 63 ms So it's not worth adding the reverse sum, just use REVLIST. I didn't think it would be that fast. 

« Next Oldest  Next Newest »

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