The Solution I came up with (which I bet many, many readers before me came up with this same better solution, or maybe even one better?), is this:
: N-MAX 1 BEGIN 2* dup 0 < UNTIL 1 - . ;
That is, keep shifting bits left until overflow then subtract 1.
: N-MAX 1 BEGIN 2* dup 0 < UNTIL 1 - . ;
That is, keep shifting bits left until overflow then subtract 1.
October 02, 2025 - 07:31 UTC
1
0
1