From 44e1994364a4271b679b2a9990b91e9fcb7a514b Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 22 Nov 2010 17:16:36 -0500 Subject: [PATCH] More precise type for sgn. Closes PR 11424. original commit: 2c74984fcd442fd73802244801946e2d4dd8ba8c --- collects/typed-scheme/private/base-env-numeric.rkt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/private/base-env-numeric.rkt b/collects/typed-scheme/private/base-env-numeric.rkt index b6f30e81..210b2f6d 100644 --- a/collects/typed-scheme/private/base-env-numeric.rkt +++ b/collects/typed-scheme/private/base-env-numeric.rkt @@ -434,7 +434,14 @@ ;; scheme/math -[sgn (-Real . -> . -Real)] +[sgn (cl->* (-Zero . -> . -Zero) + (-ExactPositiveInteger . -> . -PositiveFixnum) + (-ExactNonnegativeInteger . -> . -NonnegativeFixnum) + (-ExactRational . -> . -Fixnum) + (-Flonum . -> . -Flonum) + (-InexactReal . -> . -InexactReal) + (-Real . -> . -Real))] + [pi -NonnegativeFlonum] [sqr (cl->* (-> -Pos -Pos) (-> -Integer -Nat)