Added the new single-precision float function to TR.

This commit is contained in:
Vincent St-Amour 2011-01-19 17:38:05 -05:00
parent e65b206e6e
commit 4ac36fd59b

View File

@ -140,6 +140,8 @@
[exact-integer? (make-pred-ty -Integer)] [exact-integer? (make-pred-ty -Integer)]
[real? (make-pred-ty -Real)] [real? (make-pred-ty -Real)]
[flonum? (make-pred-ty -Flonum)] [flonum? (make-pred-ty -Flonum)]
[single-flonum? (make-pred-ty -SmallFloat)]
[double-flonum? (make-pred-ty -Flonum)]
[inexact-real? (make-pred-ty -InexactReal)] [inexact-real? (make-pred-ty -InexactReal)]
[complex? (make-pred-ty N)] [complex? (make-pred-ty N)]
[rational? (make-pred-ty -Real)] [rational? (make-pred-ty -Real)]
@ -388,6 +390,18 @@
[fl->exact-integer (cl->* [fl->exact-integer (cl->*
(-NonnegativeFlonum . -> . -Nat) (-NonnegativeFlonum . -> . -Nat)
(-Flonum . -> . -Integer))] (-Flonum . -> . -Integer))]
[real->single-flonum (cl->* (-PosReal . -> . -PosSmallFloat)
(-NegReal . -> . -NegSmallFloat)
(-RealZero . -> . -SmallFloatZero)
(-NonNegReal . -> . -NonNegSmallFloat)
(-NonPosReal . -> . -NonPosSmallFloat)
(-Real . -> . -SmallFloat))]
[real->double-flonum (cl->* (-PosReal . -> . -PosFlonum)
(-NegReal . -> . -NegFlonum)
(-RealZero . -> . -FlonumZero)
(-NonNegReal . -> . -NonNegFlonum)
(-NonPosReal . -> . -NonPosFlonum)
(-Real . -> . -Flonum))]
[floor rounder] [floor rounder]
[ceiling rounder] [ceiling rounder]