More precise types for: truncate, floor ceiling
original commit: 230f1a59c6bb51bf69c1651cadb3a77868bcbef5
This commit is contained in:
parent
c679415de3
commit
5a0e07e296
|
@ -790,7 +790,10 @@
|
|||
[tc-e (let ()
|
||||
(define: x : Any 7)
|
||||
(if (box? x) (unbox x) (+ 1)))
|
||||
Univ]
|
||||
Univ]
|
||||
[tc-e (floor 1/2) -Integer]
|
||||
[tc-e (ceiling 1/2) -Integer]
|
||||
[tc-e (truncate 0.5) -Flonum]
|
||||
)
|
||||
(test-suite
|
||||
"check-type tests"
|
||||
|
|
|
@ -112,9 +112,18 @@
|
|||
(-Real . -> . -ExactRational)
|
||||
(N . -> . N))]
|
||||
|
||||
[floor (-> -Real -Real)]
|
||||
[ceiling (-> -Real -Real)]
|
||||
[truncate (-> -Real -Real)]
|
||||
[floor (cl->*
|
||||
(-> -ExactRational -Integer)
|
||||
(-> -Flonum -Flonum)
|
||||
(-> -Real -Real))]
|
||||
[ceiling (cl->*
|
||||
(-> -ExactRational -Integer)
|
||||
(-> -Flonum -Flonum)
|
||||
(-> -Real -Real))]
|
||||
[truncate (cl->*
|
||||
(-> -ExactRational -Integer)
|
||||
(-> -Flonum -Flonum)
|
||||
(-> -Real -Real))]
|
||||
[make-rectangular (-Real -Real . -> . N)]
|
||||
[make-polar (-Real -Real . -> . N)]
|
||||
[real-part (N . -> . -Real)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user