Programming Exercise (HP-15C, 15C LE - and others)
|
03-31-2014, 10:13 PM
Post: #74
|
|||
|
|||
RE: Programming Exercise (HP-15C, 15C LE - and others)
I was impressed with the timings seen on the 42s and 34s using the "two terms at a time" approach. I didn't think a 50g would do as well, so I thought I'd give it a shot to see what might happen.
UserRPL version: Code:
Avg. of 5 runs: 42.745 seconds I was curious as to how different a SysRPL version of this might be, so I tried the following. I've added comments to (hopefully) make it a bit easier to follow the logic. SysRPL: Code:
Avg. of 5 runs: 20.318 seconds Not surprisingly, the SysRPL version was noticeably faster. But still not as good as the 42s/34s versions. Besides the speed difference, the SysRPL version also affords the opportunity to see the 15-digit result of the sum if you don't do the final conversion: 0.693097183059944 (it actually displays as "6.93097183059944E-1"). "Extended Reals" are of no use outside the context of a running SysRPL code object, but it's nice to see all the digits that were retained in the calculations. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)