Make expt type more correct.
Closes PR13170.
This commit is contained in:
parent
844e898a54
commit
788b046549
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user