Fix tests for more conservative types.

This commit is contained in:
Vincent St-Amour 2015-11-06 11:44:19 -06:00
parent 9385f6e350
commit 46f2ed95d3
2 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
#lang typed/racket/base
(: f : Real Real)
(: f : Real Number)
(define (f x)
(+ 1 (expt 1.0 x)))
(f 0)

View File

@ -385,7 +385,7 @@
(tc-e (- -24.3) -PosFlonum)
(tc-e/t 34.2f0 -PosSingleFlonum)
(tc-e/t -34.2f0 -NegSingleFlonum)
(tc-e (/ (ann 0 Nonnegative-Real) (ann 1 Nonnegative-Real)) -NonNegReal)
(tc-e (/ (ann 0 Nonnegative-Real) (ann 1 Nonnegative-Real)) -Real)
(tc-e (- (ann 1000 Index) 1) -Fixnum)
(tc-e (- (ann 1000 Positive-Index) 1) -Index)
@ -416,29 +416,29 @@
(tc-e (expt 0.5 2) (t:Un -NonNegFlonum -One))
(tc-e (expt 0.5 0) -One)
(tc-e (expt -1/2 -1/2) -Number)
(tc-e (expt (ann 0.5 Float) (ann 2 Integer)) (t:Un -Flonum -One))
(tc-e (expt (ann 0.5f0 Single-Flonum) (ann 2 Integer)) (t:Un -SingleFlonum -One))
(tc-e (expt (ann 0.5 Float) (ann 2 Integer)) -Number)
(tc-e (expt (ann 0.5f0 Single-Flonum) (ann 2 Integer)) -Number)
(tc-e (expt (*) -0.0) (t:Un -NonNegFlonum -One))
(tc-e (expt (*) 2.4521075152139656e-300) (t:Un -NonNegFlonum -One))
(tc-e (expt (*) -0.0) (t:Un -NonNegFlonum -One))
(tc-e (expt -0.0 -1.0) (t:Un -Flonum -FloatComplex))
(tc-e (expt 0 (flabs (cos (real->double-flonum 2))))
-NonNegReal)
-Number)
(tc-e (expt
(sub1 (gcd (exact-round 1)))
(- (ceiling (real->double-flonum -2.6897657f0))))
-NonNegReal)
-Number)
(tc-e (expt (sqrt (+)) (cosh (flcos (real->double-flonum 0))))
-NonNegReal)
-Number)
(tc-e (expt
(tan (real->double-flonum 6))
(lcm (*) (exact-round -1.7976931348623153e+308) 6))
(t:Un (-val 1) -Flonum))
(tc-e (flexpt 0.5 0.3) -NonNegFlonum)
(tc-e (flexpt 0.00000000001 100000000000.0) -NonNegFlonum)
-Number)
(tc-e (flexpt 0.5 0.3) -Flonum)
(tc-e (flexpt 0.00000000001 100000000000.0) -Flonum)
(tc-e (flexpt -2.0 -0.5) -Flonum) ; NaN
(tc-e (extflexpt 0.5t0 0.3t0) -NonNegExtFlonum)
(tc-e (extflexpt 0.00000000001t0 100000000000.0t0) -NonNegExtFlonum)
(tc-e (extflexpt 0.5t0 0.3t0) -ExtFlonum)
(tc-e (extflexpt 0.00000000001t0 100000000000.0t0) -ExtFlonum)
(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)
@ -456,7 +456,7 @@
(tc-e (/ (round (exact-round -2.7393196f0)) (real->double-flonum (inexact->exact (real->single-flonum -0.0)))) -Real)
(tc-e (bitwise-and (exact-round 1.7976931348623157e+308) (exact-round -29)) -Int)
(tc-e (flexpt -0.0 -1.0) -Flonum)
(tc-e (expt -0.0f0 -3.0) -InexactReal)
(tc-e (expt -0.0f0 -3.0) (t:Un -InexactReal -InexactComplex))
(tc-e (expt -8.665778974912815f+107 -677460115195106837726964554590085563061636191189747) -Number)
(tc-e (expt (sin +inf.f) +nan.0+nan.0i) -Number)
(tc-e (/ (gcd 1 0) -0.0f0 2.718281828459045) -Real)