Aubrey Jaffer noticed guile doesn't have r5rs numerator and
denominator and proposes the definitions below. The head has them
already with the exact fractions now, but I think I'll add these to
the 1.6 branch.
(define (numerator q)
(do ((num q (* 2 num)))
((integer? num) num)))
(define (denominator q)
(do ((num q (* 2 num))
(den (- q q -1) (* 2 den)))
((integer? num) den)))
_______________________________________________
Guile-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-devel