Trabb Pardo–Knuth algorithm: Difference between revisions

m
add RPL
(add RPL)
m (add RPL)
Line 3,765:
≪ DUP ABS √ SWAP 3 ^ + ≫ ''''FUNC'''' STO
≪ "Enter number, +then CONT" { } → s
1 11 '''START''' HALT s SWAP + 's' STO '''NEXT''' → s
DROP 11 1
'''FOR''' j s j GET
'''FUNC'''
Line 3,795:
|}
On HP-48 and beyond, the first 23 lines of TPK can be replaced by
≪ { }
1 11 '''START''' "Enter a number" { "?" V } INPUT + '''NEXT''' → s
≪ DROP 1 11
{{in}}
<pre>
1,150

edits