Only recommend dropping exactness in truly inexact contexts.
Please merge to release.
(cherry picked from commit 758e4ff112
)
This commit is contained in:
parent
917cd28782
commit
c5d2ebcc53
|
@ -10,15 +10,12 @@ TR missed opt: precision-loss.rkt 48:8 (* 3/4 2/3) -- all args float-arg-expr, r
|
|||
TR opt: precision-loss.rkt 49:3 (car (list (* 2.0 (ann (* 3/4 2/3) Real)))) -- pair
|
||||
TR missed opt: precision-loss.rkt 49:26 (* 3/4 2/3) -- all args float-arg-expr, result not Float -- caused by: 49:29 3/4, 49:33 2/3
|
||||
TR missed opt: precision-loss.rkt 49:14 (* 2.0 (ann (* 3/4 2/3) Real)) -- all args float-arg-expr, result not Float -- caused by: 49:26 (* 3/4 2/3)
|
||||
TR missed opt: precision-loss.rkt 49:14 (* 2.0 (ann (* 3/4 2/3) Real)) -- exact ops inside float expr -- caused by: 49:26 (* 3/4 2/3)
|
||||
TR missed opt: precision-loss.rkt 49:26 (* 3/4 2/3) -- all args float-arg-expr, result not Float -- caused by: 49:29 3/4, 49:33 2/3
|
||||
TR missed opt: precision-loss.rkt 48:0 (* (ann (* 3/4 2/3) Real) (car (list (* 2.0 (ann (* 3/4 2/3) Real)))) 2.0) -- all args float-arg-expr, result not Float -- caused by: 48:8 (* 3/4 2/3), 49:3 (car (list (* 2.0 (ann (* 3/4 2/3) Real))))
|
||||
TR missed opt: precision-loss.rkt 48:0 (* (ann (* 3/4 2/3) Real) (car (list (* 2.0 (ann (* 3/4 2/3) Real)))) 2.0) -- exact ops inside float expr -- caused by: 48:8 (* 3/4 2/3)
|
||||
TR missed opt: precision-loss.rkt 48:8 (* 3/4 2/3) -- all args float-arg-expr, result not Float -- caused by: 48:11 3/4, 48:15 2/3
|
||||
TR opt: precision-loss.rkt 49:3 (car (list (* 2.0 (ann (* 3/4 2/3) Real)))) -- pair
|
||||
TR missed opt: precision-loss.rkt 49:26 (* 3/4 2/3) -- all args float-arg-expr, result not Float -- caused by: 49:29 3/4, 49:33 2/3
|
||||
TR missed opt: precision-loss.rkt 49:14 (* 2.0 (ann (* 3/4 2/3) Real)) -- all args float-arg-expr, result not Float -- caused by: 49:26 (* 3/4 2/3)
|
||||
TR missed opt: precision-loss.rkt 49:14 (* 2.0 (ann (* 3/4 2/3) Real)) -- exact ops inside float expr -- caused by: 49:26 (* 3/4 2/3)
|
||||
TR missed opt: precision-loss.rkt 49:26 (* 3/4 2/3) -- all args float-arg-expr, result not Float -- caused by: 49:29 3/4, 49:33 2/3
|
||||
2.5
|
||||
2.75
|
||||
|
@ -28,6 +25,9 @@ TR missed opt: precision-loss.rkt 49:26 (* 3/4 2/3) -- all args float-arg-expr,
|
|||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#lang typed/racket
|
||||
|
||||
;; warn when the extra precision gained by doing exact computations would
|
||||
|
|
|
@ -2,29 +2,29 @@
|
|||
(
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- all args float-arg-expr, result not Float -- caused by: 41:15 (- max min), 41:27 x
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- exact ops inside float expr -- caused by: 41:15 (- max min)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:9 (/ (* (- max min) x) p) -- all args float-arg-expr, result not Float -- caused by: 41:12 (* (- max min) x), 41:30 p
|
||||
TR missed opt: case-arrow.rkt 41:9 (/ (* (- max min) x) p) -- exact ops inside float expr -- caused by: 41:12 (* (- max min) x)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- all args float-arg-expr, result not Float -- caused by: 41:15 (- max min), 41:27 x
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- exact ops inside float expr -- caused by: 41:15 (- max min)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:2 (+ min (/ (* (- max min) x) p)) -- all args float-arg-expr, result not Float -- caused by: 41:5 min, 41:9 (/ (* (- max min) x) p)
|
||||
TR missed opt: case-arrow.rkt 41:2 (+ min (/ (* (- max min) x) p)) -- exact ops inside float expr -- caused by: 41:9 (/ (* (- max min) x) p)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- all args float-arg-expr, result not Float -- caused by: 41:15 (- max min), 41:27 x
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- exact ops inside float expr -- caused by: 41:15 (- max min)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:9 (/ (* (- max min) x) p) -- all args float-arg-expr, result not Float -- caused by: 41:12 (* (- max min) x), 41:30 p
|
||||
TR missed opt: case-arrow.rkt 41:9 (/ (* (- max min) x) p) -- exact ops inside float expr -- caused by: 41:12 (* (- max min) x)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- all args float-arg-expr, result not Float -- caused by: 41:15 (- max min), 41:27 x
|
||||
TR missed opt: case-arrow.rkt 41:12 (* (- max min) x) -- exact ops inside float expr -- caused by: 41:15 (- max min)
|
||||
TR missed opt: case-arrow.rkt 41:15 (- max min) -- all args float-arg-expr, result not Float -- caused by: 41:18 max, 41:22 min
|
||||
)
|
||||
#lang typed/racket
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;; Typechecking functions with case-> types causes the body to be typechecked
|
||||
;; multiple times, which is fine, except that it used to cause the type table
|
||||
;; to only have information for the last branch (clobbering). This would cause
|
||||
|
|
|
@ -147,7 +147,8 @@
|
|||
(not (in-float-layer? s)))
|
||||
#'e]
|
||||
[_ #f]))))
|
||||
(when (not (null? extra-precision-subexprs))
|
||||
(when (and (not (null? extra-precision-subexprs))
|
||||
(subtypeof? this-syntax -InexactReal))
|
||||
(log-missed-optimization
|
||||
"exact ops inside float expr"
|
||||
"This expression has a Float type, but the highlighted subexpression(s) use exact arithmetic. The extra precision of the exact arithmetic will be lost. Using Float types in these subexpression(s) may result in performance gains without significant precision loss."
|
||||
|
|
Loading…
Reference in New Issue
Block a user