Continued fraction/Arithmetic/Construct from rational number: Difference between revisions
Content added Content deleted
Line 3,423: | Line 3,423: | ||
then (CF = lazy_list(delay((func) = nil))) |
then (CF = lazy_list(delay((func) = nil))) |
||
else (CF = lazy_list(delay(Cons)), |
else (CF = lazy_list(delay(Cons)), |
||
((func) = CF1 :- |
|||
( |
|||
CF1 = cons(Quotient, r2cf(Denominator, Remainder)), |
|||
%% What follows is division with truncation towards |
%% What follows is division with truncation towards |
||
⚫ | |||
%% zero. |
|||
⚫ | |||
Quotient, Remainder) |
|||
)) = Cons)). |
|||
%%%------------------------------------------------------------------- |
%%%------------------------------------------------------------------- |