Issue #433 - Working numerator/denominator

This commit is contained in:
Justin Ethier 2021-07-22 17:12:56 -04:00
parent f17102178b
commit 95c3fea24f
2 changed files with 6 additions and 8 deletions

View file

@ -2,6 +2,10 @@
## 0.31.0 - TBD ## 0.31.0 - TBD
Features
- Replaced placeholder versions of `numerator` and `denominator` with code conforming with R7RS.
Bug Fixes Bug Fixes
- Allow a record type to contain fields that are not initialized by the constructor. - Allow a record type to contain fields that are not initialized by the constructor.

View file

@ -196,8 +196,6 @@
string->utf8 string->utf8
denominator denominator
numerator numerator
;denominator2
;numerator2
parameterize parameterize
read-bytevector read-bytevector
read-bytevector! read-bytevector!
@ -222,8 +220,6 @@
(inline (inline
square square
quotient quotient
numerator
denominator
truncate truncate
negative? negative?
positive? positive?
@ -1488,13 +1484,11 @@
;; END gcd lcm ;; END gcd lcm
;; Placeholders ;; Placeholders
(define (denominator n) 1) (define-c numerator
(define (numerator n) n)
(define-c numerator2
"(void *data, int argc, closure _, object k, object n)" "(void *data, int argc, closure _, object k, object n)"
" Cyc_get_ratio(data, k, n, 1);") " Cyc_get_ratio(data, k, n, 1);")
(define-c denominator2 (define-c denominator
"(void *data, int argc, closure _, object k, object n)" "(void *data, int argc, closure _, object k, object n)"
" Cyc_get_ratio(data, k, n, 0);") " Cyc_get_ratio(data, k, n, 0);")