I just checked in a fix for this. On Mon, Aug 24, 2009 at 5:11 AM, Taylor R Campbell<[email protected]> wrote: > 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 >
_______________________________________________ MIT-Scheme-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/mit-scheme-devel
