Added numerator/denominator

This commit is contained in:
Justin Ethier 2016-04-04 23:39:16 -04:00
parent c84db62a4a
commit de0c62ee5e
2 changed files with 7 additions and 5 deletions

2
TODO
View file

@ -20,7 +20,7 @@ Tier 1:
- destruc.scm
- diviter.scm
- divrec.scm
- dynamic.scm - Need to handle optional radix argument to number->string
- dynamic.scm
- earley.scm
- equal.scm
- fft.scm

View file

@ -157,6 +157,8 @@
bytevector-copy
utf8->string
string->utf8
denominator
numerator
;;;;
; Possibly missing functions:
@ -179,10 +181,6 @@
; ; No complex or rational numbers at this time
; rationalize
;
; ; Need to change how integer? works, to include floatings points without any decimals
; denominator
; numerator
;
; ; need string ports
; ; may be able to use POSIX string steams for this, see: open_memstream
; ; however there may be portability issues with that. looks like BSD and windows don't have it
@ -1009,6 +1007,10 @@
(foldl lcm/main (car nums) (cdr nums))))
;; END gcd lcm
;; Placeholders
(define (denominator n) 1)
(define (numerator n) n)
;; TODO: possibly not correct, just a placeholder
(define quotient /)