Better type for `round'.
original commit: 40c77586a059efc6a09a6ef0bdf73a35808f24b0
This commit is contained in:
parent
c7db08fcf7
commit
b1e9e9ea82
|
@ -19,6 +19,8 @@
|
|||
(define-for-syntax binop
|
||||
(lambda (t [r t])
|
||||
(t t . -> . r)))
|
||||
(define-for-syntax rounder
|
||||
(cl->* (-> -ExactRational -Integer) (-> -Flonum -Flonum) (-> -Real -Real)))
|
||||
|
||||
(define-for-syntax (unop t) (-> t t))
|
||||
|
||||
|
@ -112,18 +114,10 @@
|
|||
(-Real . -> . -ExactRational)
|
||||
(N . -> . N))]
|
||||
|
||||
[floor (cl->*
|
||||
(-> -ExactRational -Integer)
|
||||
(-> -Flonum -Flonum)
|
||||
(-> -Real -Real))]
|
||||
[ceiling (cl->*
|
||||
(-> -ExactRational -Integer)
|
||||
(-> -Flonum -Flonum)
|
||||
(-> -Real -Real))]
|
||||
[truncate (cl->*
|
||||
(-> -ExactRational -Integer)
|
||||
(-> -Flonum -Flonum)
|
||||
(-> -Real -Real))]
|
||||
[floor rounder]
|
||||
[ceiling rounder]
|
||||
[truncate rounder]
|
||||
[round rounder]
|
||||
[make-rectangular (-Real -Real . -> . N)]
|
||||
[make-polar (-Real -Real . -> . N)]
|
||||
[real-part (N . -> . -Real)]
|
||||
|
@ -150,8 +144,6 @@
|
|||
[gcd (null -Integer . ->* . -Integer)]
|
||||
[lcm (null -Integer . ->* . -Integer)]
|
||||
|
||||
[round (-Real . -> . -Real)]
|
||||
|
||||
;; scheme/math
|
||||
|
||||
[sgn (-Real . -> . -Real)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user