diff --git a/CHANGELOG.md b/CHANGELOG.md index 5684dc80..c6051785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Features - Enhanced the reader to parse rationals and store them as inexact numbers. +- Add a stub for `(rationalize x y)` to `(scheme base)`. Bug Fixes diff --git a/scheme/base.sld b/scheme/base.sld index bb35f6aa..669b8cde 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -205,15 +205,10 @@ write-u8 binary-port? textual-port? - + rationalize ;;;; ; Possibly missing functions: -; ; u8-ready? -; -; ; No complex or rational numbers at this time -; rationalize -; ; ;; syntax-rules ;;;; ) @@ -1483,6 +1478,9 @@ "(void *data, object ptr, object z)" " return Cyc_is_complex(z); ") (define rational? number?) + ;; Stub, doesn't do much now because rationals are not supported + (define (rationalize x y) + (/ x y)) (define (max first . rest) (foldl (lambda (old new) (if (> old new) old new)) first rest)) (define (min first . rest) (foldl (lambda (old new) (if (< old new) old new)) first rest)) ; Implementations of gcd and lcm using Euclid's algorithm