Merge branch 'integral-to-inexact'
This commit is contained in:
commit
2a4ce892ae
|
@ -1729,6 +1729,8 @@
|
|||
[exact->inexact
|
||||
(from-cases (map unop all-float-types)
|
||||
(-Zero . -> . -FlonumZero)
|
||||
(-PosInt . -> . -PosFlonum)
|
||||
(-NegInt . -> . -NegFlonum)
|
||||
(-PosRat . -> . -NonNegFlonum)
|
||||
(-NegRat . -> . -NonPosFlonum)
|
||||
(-Rat . -> . -Flonum)
|
||||
|
@ -1757,16 +1759,28 @@
|
|||
(-NegFlonum . -> . -NegInt)
|
||||
(-NonPosFlonum . -> . -NonPosInt)
|
||||
(-Flonum . -> . -Int))]
|
||||
[real->single-flonum (cl->* (-RealZero . -> . -SingleFlonumZero)
|
||||
;; no positive / negative cases, possible underflow
|
||||
(-NonNegReal . -> . -NonNegSingleFlonum)
|
||||
(-NonPosReal . -> . -NonPosSingleFlonum)
|
||||
(-Real . -> . -SingleFlonumZero))]
|
||||
[real->double-flonum (cl->* (-RealZero . -> . -FlonumZero)
|
||||
;; no positive / negative cases, possible underflow
|
||||
(-NonNegReal . -> . -NonNegFlonum)
|
||||
(-NonPosReal . -> . -NonPosFlonum)
|
||||
(-Real . -> . -Flonum))]
|
||||
[real->single-flonum
|
||||
(from-cases (map unop single-flonum-types)
|
||||
(-FlonumPosZero . -> . -SingleFlonumPosZero)
|
||||
(-FlonumNegZero . -> . -SingleFlonumNegZero)
|
||||
(-RealZero . -> . -SingleFlonumZero)
|
||||
(-PosInt . -> . -PosSingleFlonum)
|
||||
(-NegInt . -> . -NegSingleFlonum)
|
||||
;; no positive / negative cases, possible underflow
|
||||
(-NonNegReal . -> . -NonNegSingleFlonum)
|
||||
(-NonPosReal . -> . -NonPosSingleFlonum)
|
||||
(-Real . -> . -SingleFlonumZero))]
|
||||
[real->double-flonum
|
||||
(from-cases (map unop all-flonum-types)
|
||||
(-SingleFlonumPosZero . -> . -FlonumPosZero)
|
||||
(-SingleFlonumNegZero . -> . -FlonumNegZero)
|
||||
(-RealZero . -> . -FlonumZero)
|
||||
(-PosInt . -> . -PosFlonum)
|
||||
(-NegInt . -> . -NegFlonum)
|
||||
;; no positive / negative cases, possible underflow
|
||||
(-NonNegReal . -> . -NonNegFlonum)
|
||||
(-NonPosReal . -> . -NonPosFlonum)
|
||||
(-Real . -> . -Flonum))]
|
||||
|
||||
[floor
|
||||
(from-cases
|
||||
|
|
|
@ -450,12 +450,26 @@
|
|||
(tc-e (min (ann -2 Negative-Fixnum) (ann 3 Fixnum)) -NegFixnum)
|
||||
(tc-e (min (ann 3 Fixnum) (ann -2 Negative-Fixnum)) -NegFixnum)
|
||||
(tc-e (exact->inexact (ann 3 Number)) (t:Un -InexactReal -InexactComplex))
|
||||
(tc-e (exact->inexact 3) -PosFlonum)
|
||||
(tc-e (exact->inexact -3) -NegFlonum)
|
||||
(tc-e (real->double-flonum 0.0) -FlonumPosZero)
|
||||
(tc-e (real->double-flonum -0.0) -FlonumNegZero)
|
||||
(tc-e (real->double-flonum 0.0f0) -FlonumPosZero)
|
||||
(tc-e (real->double-flonum -0.0f0) -FlonumNegZero)
|
||||
(tc-e (real->double-flonum #e1e-500) -NonNegFlonum)
|
||||
(tc-e (real->double-flonum #e-1e-500) -NonPosFlonum)
|
||||
(tc-e (real->double-flonum 3) -PosFlonum)
|
||||
(tc-e (real->double-flonum -3) -NegFlonum)
|
||||
(tc-e (real->single-flonum 0.0) -SingleFlonumPosZero)
|
||||
(tc-e (real->single-flonum -0.0) -SingleFlonumNegZero)
|
||||
(tc-e (real->single-flonum 0.0f0) -SingleFlonumPosZero)
|
||||
(tc-e (real->single-flonum -0.0f0) -SingleFlonumNegZero)
|
||||
(tc-e (real->single-flonum #e1e-500) -NonNegSingleFlonum)
|
||||
(tc-e (real->single-flonum #e-1e-500) -NonPosSingleFlonum)
|
||||
(tc-e (real->single-flonum 1e-300) -NonNegSingleFlonum)
|
||||
(tc-e (real->single-flonum -1e-300) -NonPosSingleFlonum)
|
||||
(tc-e (real->single-flonum 3) -PosSingleFlonum)
|
||||
(tc-e (real->single-flonum -3) -NegSingleFlonum)
|
||||
(tc-e (extfl->inexact 1t-500) -NonNegFlonum)
|
||||
(tc-e (extfl->inexact -1t-500) -NonPosFlonum)
|
||||
(tc-e (real->extfl #e1e-8192) -NonNegExtFlonum)
|
||||
|
|
Loading…
Reference in New Issue
Block a user