mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-08 21:47:33 +02:00
Added numerator/denominator
This commit is contained in:
parent
c84db62a4a
commit
de0c62ee5e
2 changed files with 7 additions and 5 deletions
2
TODO
2
TODO
|
@ -20,7 +20,7 @@ Tier 1:
|
||||||
- destruc.scm
|
- destruc.scm
|
||||||
- diviter.scm
|
- diviter.scm
|
||||||
- divrec.scm
|
- divrec.scm
|
||||||
- dynamic.scm - Need to handle optional radix argument to number->string
|
- dynamic.scm
|
||||||
- earley.scm
|
- earley.scm
|
||||||
- equal.scm
|
- equal.scm
|
||||||
- fft.scm
|
- fft.scm
|
||||||
|
|
|
@ -157,6 +157,8 @@
|
||||||
bytevector-copy
|
bytevector-copy
|
||||||
utf8->string
|
utf8->string
|
||||||
string->utf8
|
string->utf8
|
||||||
|
denominator
|
||||||
|
numerator
|
||||||
|
|
||||||
;;;;
|
;;;;
|
||||||
; Possibly missing functions:
|
; Possibly missing functions:
|
||||||
|
@ -179,10 +181,6 @@
|
||||||
; ; No complex or rational numbers at this time
|
; ; No complex or rational numbers at this time
|
||||||
; rationalize
|
; rationalize
|
||||||
;
|
;
|
||||||
; ; Need to change how integer? works, to include floatings points without any decimals
|
|
||||||
; denominator
|
|
||||||
; numerator
|
|
||||||
;
|
|
||||||
; ; need string ports
|
; ; need string ports
|
||||||
; ; may be able to use POSIX string steams for this, see: open_memstream
|
; ; 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
|
; ; 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))))
|
(foldl lcm/main (car nums) (cdr nums))))
|
||||||
;; END gcd lcm
|
;; END gcd lcm
|
||||||
|
|
||||||
|
;; Placeholders
|
||||||
|
(define (denominator n) 1)
|
||||||
|
(define (numerator n) n)
|
||||||
|
|
||||||
;; TODO: possibly not correct, just a placeholder
|
;; TODO: possibly not correct, just a placeholder
|
||||||
(define quotient /)
|
(define quotient /)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue