Post Reply 
HP-42S (Free42, DM-42) mini-challenge – Wallis Product
07-13-2020, 07:04 AM
Post: #28
RE: HP-42S (Free42, DM-42) mini-challenge – Wallis Product
The limit of my routine on Free42 is 10203, which is quite a lot larger though.
It could've been slightly larger still, but COMB errors out on C(20408,10204) even though the result is less than 1e6145. COMB should be able to compute up to C(20420,10210) using a little trick, as demonstrated in this RPN version:

Code:
00 { 71-Byte Prgm }
01▸LBL "CMB"
02 LSTO "L"
03 R↓
04 R↓
05 LSTO "Z"
06 R↓
07 LSTO "T"
08 R↓
09 STO- ST Y
10 X>Y?
11 X<>Y
12 STO+ ST Y
13 1
14 X>Y?
15 GTO 00
16 1ᴇ-4
17▸LBL 02
18 RCL× ST T
19 RCL÷ ST Y
20 DSE ST T
21 ISG ST Y
22 X<>Y
23 DSE ST Z
24 GTO 02
25 1ᴇ4
26 ×
27▸LBL 00
28 RCL "L"
29 ABS
30 RCL "T"
31 STO ST Y
32 RCL "Z"
33 R↑
34 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-42S (Free42, DM-42) mini-challenge – Wallis Product - Werner - 07-13-2020 07:04 AM



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