Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion collects/tests/typed-racket/unit-tests/typecheck-tests.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions collects/typed-racket/base-env/base-env-numeric.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down