Fix use of values in type of integer-sqrt/remainder.

Closes PR 15034.
This commit is contained in:
Vincent St-Amour 2015-04-28 17:41:02 -04:00
parent a80f55946d
commit 257d4ec9a7
2 changed files with 9 additions and 8 deletions

View File

@ -1841,21 +1841,21 @@
(-Real . -> . N))] ; defined on inexact integers too, but not complex
[integer-sqrt/remainder
(from-cases
(-Zero . -> . (-values -Zero -Zero))
(-One . -> . (-values -One -Zero))
(-Byte . -> . (-values -Byte -Byte))
(-Index . -> . (-values -Index -Index))
(-NonNegFixnum . -> . (-values -Index -NonNegFixnum))
(-Zero . -> . (-values (list -Zero -Zero)))
(-One . -> . (-values (list -One -Zero)))
(-Byte . -> . (-values (list -Byte -Byte)))
(-Index . -> . (-values (list -Index -Index)))
(-NonNegFixnum . -> . (-values (list -Index -NonNegFixnum)))
(map (λ (t) (t . -> . (-values t -Int)))
(map (λ (t) (t . -> . (-values (list t -Int))))
(list -Nat -NonNegRat
-FlonumPosZero -FlonumNegZero -FlonumZero -NonNegFlonum
-SingleFlonumPosZero -SingleFlonumNegZero -SingleFlonumZero -NonNegSingleFlonum
-InexactRealPosZero -InexactRealNegZero -InexactRealZero -NonNegInexactReal
-RealZero -NonNegReal))
(-Rat . -> . (-values -ExactNumber -Int))
(-Real . -> . (-values N -Int)))] ; defined on inexact integers too
(-Rat . -> . (-values (list -ExactNumber -Int)))
(-Real . -> . (-values (list N -Int))))] ; defined on inexact integers too
[log (cl->*
(-NonNegRat . -> . -Real)

View File

@ -440,6 +440,7 @@
(tc-e (extflexpt 0.5t0 0.3t0) -NonNegExtFlonum)
(tc-e (extflexpt 0.00000000001t0 100000000000.0t0) -NonNegExtFlonum)
(tc-e (extflexpt -2.0t0 -0.5t0) -ExtFlonum) ; NaN
(tc-e (let-values ([(x y) (integer-sqrt/remainder 0)]) (+ x y)) -Zero)
(tc-e (tanh (ann 0 Nonnegative-Integer)) -NonNegReal)
(tc-e (sinh (ann 0 Nonpositive-Integer)) -NonPosReal)
(tc-e (angle -1) (t:Un -InexactReal -Zero))