Is this the right thing? I observe similar weirdness with NaNs. ;; As expected: (/ 1.0 0.0) ;Value: #[+inf]
;; Not every Scheme agrees with this assessment, but OK: (rational? (/ 1.0 0.0)) ;Value: #t ;; Now this is a little weird. (numerator (/ 1.0 0.0)) ;Value: 0. (denominator (/ 1.0 0.0)) ;Value: 1. ;; The culprit: ((access flo:->rational (->environment '(runtime number))) (/ 1.0 0.0)) ;Value: 0 ;; Why does that happen? It passes FLO:->INTEGER (a.k.a. ;; FLO:TRUNCATE->EXACT) an infinity, and, yikes! (flo:truncate->exact (/ 1.0 0.0)) ;Value: 0000000 _______________________________________________ MIT-Scheme-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/mit-scheme-devel
