Fix interaction of sign and underflow in fl/.

Found using random testing.
This commit is contained in:
Vincent St-Amour 2015-11-02 16:09:32 -06:00
parent a3d29d9e03
commit e47ffeb0e8
2 changed files with 2 additions and 1 deletions

View File

@ -489,7 +489,7 @@
(fl-type-lambda
(from-cases (-FlZero -Fl . -> . -FlZero)
;; we don't have Pos Pos -> Pos, possible underflow
(-NonNegFl -NonNegFl . -> . -NonNegFl)
(-PosFl -PosFl . -> . -NonNegFl)
(commutative-binop -PosFl -NegFl -NonPosFl)
(-NegFl -NegFl . -> . -NonNegFl)
(binop -Fl))))

View File

@ -450,6 +450,7 @@
(tc-e (min (ann 3 Fixnum) (ann 3 Fixnum)) -Fixnum)
(tc-e (min (ann -2 Negative-Fixnum) (ann 3 Fixnum)) -NegFixnum)
(tc-e (min (ann 3 Fixnum) (ann -2 Negative-Fixnum)) -NegFixnum)
(tc-e (fl/ 1.7976931348623157e+308 -0.0e0) -Flonum)
(tc-e (exact->inexact (ann 3 Number)) (t:Un -InexactReal -InexactComplex))
(tc-e (exact->inexact 3) -PosFlonum)
(tc-e (exact->inexact -3) -NegFlonum)