From e06f31c94e6655c1ecf88ff18a0ecbee9af2e250 Mon Sep 17 00:00:00 2001 From: Neil Toronto Date: Sat, 29 Dec 2012 14:55:25 -0700 Subject: [PATCH] More precise return type for `magnitude' (it always returns nonnegative) --- collects/typed-racket/base-env/base-env-numeric.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/typed-racket/base-env/base-env-numeric.rkt b/collects/typed-racket/base-env/base-env-numeric.rkt index 3ff81ab3ab..cb833661da 100644 --- a/collects/typed-racket/base-env/base-env-numeric.rkt +++ b/collects/typed-racket/base-env/base-env-numeric.rkt @@ -1578,10 +1578,10 @@ (-FloatComplex . -> . -Flonum) (-InexactComplex . -> . -InexactReal) (N . -> . -Real))] -[magnitude (cl->* (-Rat . -> . -Rat) - (-FloatComplex . -> . -Flonum) - (-InexactComplex . -> . -InexactReal) - (N . -> . -Real))] +[magnitude (cl->* (-Rat . -> . -NonNegRat) + (-FloatComplex . -> . -NonNegFlonum) + (-InexactComplex . -> . -NonNegInexactReal) + (N . -> . -NonNegReal))] [angle (cl->* (-PosReal . -> . -Zero) (-FloatComplex . -> . -Flonum) (-InexactComplex . -> . -InexactReal)