Continued fraction/Arithmetic/Construct from rational number: Difference between revisions
Continued fraction/Arithmetic/Construct from rational number (view source)
Revision as of 09:42, 9 July 2015
, 8 years agoJ →version 2: indentation
m (→version 3) |
m (J →version 2: indentation) |
||
Line 493:
==== version 2 ====
<lang J>
a =. {.y
b =. {:y
out=. <. a%b
while. b > 1 do.
'a b' =. b; b|a
out=. out , <. a%b
end.
)
f each 1 2;3 1;23 8;13 11;22 7;14142136 10000000;_151 77
|