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:
parent
75ab52e490
commit
10d11e6537
1 changed files with 4 additions and 4 deletions
|
@ -825,10 +825,10 @@ minimum, and maximum."
|
||||||
;; If we have inferred that the arguments are not flonums and not
|
;; If we have inferred that the arguments are not flonums and not
|
||||||
;; compnums, then the result of (* +inf.0 0) at range inference
|
;; compnums, then the result of (* +inf.0 0) at range inference
|
||||||
;; time is 0 and not +nan.0.
|
;; time is 0 and not +nan.0.
|
||||||
(if (or (and (inf? a) (zero? b))
|
(if (and (or (and (inf? a) (zero? b))
|
||||||
(and (zero? a) (inf? b))
|
(and (zero? a) (inf? b)))
|
||||||
(not (logtest (logior (&type a) (&type b))
|
(not (logtest (logior (&type a) (&type b))
|
||||||
(logior &flonum &complex))))
|
(logior &flonum &complex))))
|
||||||
0
|
0
|
||||||
(* a b)))
|
(* a b)))
|
||||||
(let ((-- (nan* min-a min-b))
|
(let ((-- (nan* min-a min-b))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue