Post Reply 
Mini-Challenge: Rudin-Shapiro Sequence
12-10-2022, 10:56 PM (This post was last modified: 12-10-2022 10:58 PM by John Keith.)
Post: #4
RE: Mini-Challenge: Rudin-Shapiro Sequence
(12-10-2022 05:54 AM)Gerald H Wrote:  «
« DUP 2. >
IF
THEN DUP 4. / IP SWAP 4. MOD DUP 1. >
IF
THEN SWAP DUP + 1. + ←P EVAL SWAP 2. MOD +
ELSE DROP ←P EVAL
END
ELSE DROP 0.
END
» → ←P
« ←P EVAL
»
»[/code]

There seems to be a missing right arrow before the second from last ←P as indicated above. It now runs and returns u(n).

Neat program, I'm still trying to wrap my head around compiled local variables. Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mini-Challenge: Rudin-Shapiro Sequence - John Keith - 12-10-2022 10:56 PM



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