Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2): Difference between revisions

m
Line 4,156:
 
(define ng ng8)
(define xsource (lambda (i) (cf-ref x i)))
(define ysource (lambda (i) (cf-ref y i)))
(define ix 0)
(define iy 0)
Line 4,199:
(define-values (a12 a1 a2 a b12 b1 b2 b)
(apply values ng))
(define term (cf-ref xsource ix))
(set! ix (+ ix 1))
(if term
Line 4,213:
;; Replace the x source with one that returns no
;; terms.
(set! xsource (lambda _(i) #f))
(set! ng (list a12 a1 a12 a1 b12 b1 b12 b1)))))
(set! ng (list a12 a1 a12 a1 b12 b1 b12 b1)))
Line 4,221:
(define-values (a12 a1 a2 a b12 b1 b2 b)
(apply values ng))
(define term (cf-ref ysource iy))
(set! iy (+ iy 1))
(if term
Line 4,233:
;; Replace the y source with one that returns no
;; terms.
(set! ysource (lambda _(i) #f))
(set! ng (list a12 a12 a2 a2 b12 b12 b2 b2)))))
(set! ng (list a12 a12 a2 a2 b12 b12 b2 b2)))
1,448

edits