Added truncate-finite-float64 and compare

This commit is contained in:
waldemar%netscape.com 2001-08-10 23:27:43 +00:00
parent a016f1f7ac
commit 717626b7d7

View File

@ -25,6 +25,19 @@
((/= a 0) (return 78.0))
((< x 0 rational) (return -zero))
(nil (return +zero))))
(define (x-truncate-finite-float64 (x finite-float64)) integer
(rwhen (:narrow-false (in (tag +zero -zero) x))
(return 0))
(if (> x 0 rational)
(return (floor x))
(return (ceiling x))))
(define (compare (x rational) (y rational)) order
(cond
((< x y rational) (return less))
((= x y rational) (return equal))
(nil (return greater))))
)))
(defparameter *sfg* (world-grammar *sfw* 'standard-function-grammar)))