Calkin-Wilf sequence: Difference between revisions

Content added Content deleted
(Added Quackery.)
Line 1,863: Line 1,863:


=={{header|Quackery}}==
=={{header|Quackery}}==

<code>cf</code> is defined at [[Continued fraction/Arithmetic/Construct from rational number#Quackery]].


<lang Quackery> [ $ "bigrat.qky" loadfile ] now!
<lang Quackery> [ $ "bigrat.qky" loadfile ] now!
Line 1,875: Line 1,877:


[ 1 & ] is odd ( n --> b )
[ 1 & ] is odd ( n --> b )

[ [] unrot
[ proper
2swap join unrot
over 0 != while
1/v again ]
2drop ] is cf ( n/d --> [ )


[ dup size odd not if
[ dup size odd not if