Post Reply 
Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant
02-20-2017, 04:41 PM
Post: #47
RE: Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant
(02-18-2017 04:12 AM)Claudio L. Wrote:  While using REVLIST is fine, it's much slower than just adding in reverse order.


(02-18-2017 05:11 AM)Paul Dale Wrote:  Wouldn't the time for the floating point additions far outweigh the time to reverse the list???

(02-19-2017 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 12-digit result. Seems to me a small price to pay for accuracy.

You are both right, my tests revealed (at default 32-digit 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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant - Claudio L. - 02-20-2017 04:41 PM



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