1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-03 08:10:31 +02:00

Fix type-fold on multiplying exact numbers

* module/language/cps/types.scm (mul): Fix bug inferring results of
  exact multiplications.
This commit is contained in:
Andy Wingo 2015-05-25 15:16:32 +02:00
parent 75ab52e490
commit 10d11e6537

View file

@ -825,8 +825,8 @@ 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))
(if (and (or (and (inf? a) (zero? b))
(and (zero? a) (inf? b)))
(not (logtest (logior (&type a) (&type b))
(logior &flonum &complex))))
0