Make expt type more correct.

Closes PR13170.
This commit is contained in:
Eric Dobson 2012-10-13 22:23:33 -07:00 committed by Vincent St-Amour
parent 844e898a54
commit 788b046549
2 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,8 @@
(tc-e (lcm (ann 3 Integer) -1/2) -NonNegRat)
(tc-e (expt 0.5 0.3) -PosFlonum)
(tc-e (expt 0.5 2) -PosFlonum)
(tc-e (expt 0.5 0) -PosFlonum)
(tc-e (expt 0.5 0) -One)
(tc-e (expt -1/2 -1/2) N)
(tc-e (flexpt 0.5 0.3) -NonNegFlonum)
(tc-e (flexpt 0.00000000001 100000000000.0) -NonNegFlonum)
(tc-e (flexpt -2.0 -0.5) -Flonum) ; NaN

View File

@ -1624,7 +1624,7 @@
(map binop (list -NonNegReal -NonPosReal -Real)))]
[expt
(from-cases (-> -One -Rat -One)
(map (lambda (t) (-> t -Zero t)) all-int-types) ; will error if negative
(map (lambda (t) (-> t -Zero -One)) all-number-types) ; will error if negative
(-PosInt -Nat . -> . -PosInt)
(-Nat -Nat . -> . -Nat)
(-Int -Nat . -> . -Int)
@ -1648,7 +1648,6 @@
(-InexactReal (Un -NegInt -PosInt) . -> . -InexactReal)
(-Real (Un -NegInt -PosInt) . -> . -Real)
(-InexactReal -InexactReal . -> . (Un -InexactReal -InexactComplex))
(-ExactNumber -ExactNumber . -> . -ExactNumber)
(-FloatComplex (Un -InexactComplex -InexactReal) . -> . -FloatComplex)
(-SingleFlonumComplex (Un -SingleFlonum -SingleFlonumComplex) . -> . -SingleFlonumComplex)
((Un -InexactReal -InexactComplex) -InexactComplex . -> . -InexactComplex)