From 10d11e6537fa4649e51faa356c178c13510880b4 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 25 May 2015 15:16:32 +0200 Subject: [PATCH] Fix type-fold on multiplying exact numbers * module/language/cps/types.scm (mul): Fix bug inferring results of exact multiplications. --- module/language/cps/types.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm index 3df1530ed..5e0b2d083 100644 --- a/module/language/cps/types.scm +++ b/module/language/cps/types.scm @@ -825,10 +825,10 @@ minimum, and maximum." ;; If we have inferred that the arguments are not flonums and not ;; compnums, then the result of (* +inf.0 0) at range inference ;; time is 0 and not +nan.0. - (if (or (and (inf? a) (zero? b)) - (and (zero? a) (inf? b)) - (not (logtest (logior (&type a) (&type b)) - (logior &flonum &complex)))) + (if (and (or (and (inf? a) (zero? b)) + (and (zero? a) (inf? b))) + (not (logtest (logior (&type a) (&type b)) + (logior &flonum &complex)))) 0 (* a b))) (let ((-- (nan* min-a min-b))