Mini-challenge: Fast F(93) on HP-16C
|
08-07-2023, 11:48 AM
(This post was last modified: 08-07-2023 01:44 PM by MarkB.)
Post: #9
|
|||
|
|||
RE: Mini-challenge: Fast F(93) on HP-16C
Here is my attempt. I don't have a 16C and am patiently waiting for my 15C CE. I've tried it on the Jovial RPN emulator and without changing the speed setting, it took about 15s for F(93).
It is based on the fact that: F(0) = 0 F(1) = 1 F(2n) = F(n)(2F(n+1) - F(n)) F(2n+1) = F(n+1)^2 + F(n)^2 I've taken inspiration for this solution from this description. For input larger than 93, it will just turn on the "G" flag. I've never used a 16C before so not sure if this is particularly good code, but here it is anyway. Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Mini-challenge: Fast F(93) on HP-16C - Joe Horn - 08-06-2023, 05:35 PM
RE: Mini-challenge: Fast F(93) on HP-16C - ThomasF - 08-06-2023, 08:24 PM
RE: Mini-challenge: Fast F(93) on HP-16C - SlideRule - 08-07-2023, 02:21 AM
RE: Mini-challenge: Fast F(93) on HP-16C - ThomasF - 08-07-2023, 06:04 AM
RE: Mini-challenge: Fast F(93) on HP-16C - Joe Horn - 08-07-2023, 07:52 AM
RE: Mini-challenge: Fast F(93) on HP-16C - ThomasF - 08-07-2023, 07:59 AM
RE: Mini-challenge: Fast F(93) on HP-16C - Joe Horn - 08-07-2023, 08:15 AM
RE: Mini-challenge: Fast F(93) on HP-16C - Voldemar - 08-07-2023, 09:50 AM
RE: Mini-challenge: Fast F(93) on HP-16C - MarkB - 08-07-2023 11:48 AM
RE: Mini-challenge: Fast F(93) on HP-16C - MarkB - 08-08-2023, 07:15 AM
RE: Mini-challenge: Fast F(93) on HP-16C - Joe Horn - 08-08-2023, 07:59 AM
|
User(s) browsing this thread: 1 Guest(s)