From 2553e36d240ac8e7d6ec65946e8ba1cc17674812 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 4 Dec 2012 15:23:39 -0500 Subject: [PATCH] Don't warn about exact arithmetic for inexact numbers. original commit: 45a3b9f48de31075fe8f83e60a7f47fe5db78aaa --- collects/typed-racket/optimizer/float.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/typed-racket/optimizer/float.rkt b/collects/typed-racket/optimizer/float.rkt index f3ef404a..ce894d74 100644 --- a/collects/typed-racket/optimizer/float.rkt +++ b/collects/typed-racket/optimizer/float.rkt @@ -160,7 +160,9 @@ (filter values (for/list ([subexpr (in-list (syntax->list #'(f1 f2 fs ...)))] - #:when (or (in-real-layer? subexpr) + #:when (or (and (in-real-layer? subexpr) + ;; exclude single-flonums + (not (subtypeof? subexpr -InexactReal))) (in-rational-layer? subexpr))) (syntax-parse subexpr ;; Only warn about subexpressions that actually perform exact arithmetic.