From 7d317f1e96e77ca9ce85136608b49d420ad39630 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 24 Sep 2012 18:49:10 -0400 Subject: [PATCH] Recommend float-specific operations in case of unexpected complex. Please merge to release. --- collects/typed-racket/optimizer/float-complex.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/typed-racket/optimizer/float-complex.rkt b/collects/typed-racket/optimizer/float-complex.rkt index b05872be52..3c2b9e9cd5 100644 --- a/collects/typed-racket/optimizer/float-complex.rkt +++ b/collects/typed-racket/optimizer/float-complex.rkt @@ -449,7 +449,13 @@ (subtypeof? subexpr -Real))) (log-missed-optimization "unexpected complex type" - "This expression has a Complex type, despite all its arguments being reals. If you do not want or expect complex numbers as results, you may want to restrict the type of the arguments, which may have a beneficial impact on performance." + (string-append + "This expression has a Complex type, despite all its " + "arguments being reals. If you do not want or expect " + "complex numbers as results, you may want to restrict " + "the type of the arguments or use float-specific " + "operations (e.g. flsqrt), which may have a beneficial " + "impact on performance.") this-syntax)) ;; We don't actually want to match. #:when #f