guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/12: Fix type-fold on multiplying exact numbers


From: Andy Wingo
Subject: [Guile-commits] 02/12: Fix type-fold on multiplying exact numbers
Date: Tue, 02 Jun 2015 08:33:49 +0000

wingo pushed a commit to branch master
in repository guile.

commit 10d11e6537fa4649e51faa356c178c13510880b4
Author: Andy Wingo <address@hidden>
Date:   Mon May 25 15:16:32 2015 +0200

    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 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm
index 3df1530..5e0b2d0 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]