Anonymous user
Minkowski question-mark function: Difference between revisions
m
→{{header|REXX}}: tidied up some DO group codes.
m (→{{header|REXX}}: changed use of INT to FLOOR.) |
m (→{{header|REXX}}: tidied up some DO group codes.) |
||
Line 354:
q= 1; s= 1; m= 0; n= 0; d= 1; y= p
r= p + 1
do forever; d= d * 0.5; if y+d=y | d=0 then leave
if
end /*forever*/
return y + d
Line 371 ⟶ 366:
curr= 0; count= 1; maxIter= 200; $=
else if x>1 then do; count= count + 1; x= x-1; end
if x==floor(x) then do; $= $ count; leave; end
▲ end /*until*/
#= words($)
|