Cleanup float optimizations.

This commit is contained in:
Eric Dobson 2013-09-04 23:05:42 -07:00
parent 02f918107e
commit 1f631a219f
5 changed files with 125 additions and 174 deletions

View File

@ -1,6 +1,7 @@
#lang racket/base #lang racket/base
(require syntax/parse unstable/sequence racket/dict racket/flonum (require syntax/parse unstable/sequence racket/dict racket/flonum racket/promise
syntax/parse/experimental/specialize
(for-template racket/base racket/flonum racket/unsafe/ops racket/math) (for-template racket/base racket/flonum racket/unsafe/ops racket/math)
"../utils/utils.rkt" "../utils/utils.rkt"
(utils tc-utils) (utils tc-utils)
@ -27,6 +28,15 @@
(mk-float-tbl (list #'abs #'sin #'cos #'tan #'asin #'acos #'atan #'log #'exp (mk-float-tbl (list #'abs #'sin #'cos #'tan #'asin #'acos #'atan #'log #'exp
#'sqrt #'round #'floor #'ceiling #'truncate))) #'sqrt #'round #'floor #'ceiling #'truncate)))
(define-literal-syntax-class -)
(define-literal-syntax-class /)
(define-literal-syntax-class sqr)
(define-literal-syntax-class zero?)
(define-literal-syntax-class add1)
(define-literal-syntax-class sub1)
(define-literal-syntax-class ->float^ (exact->inexact real->double-flonum))
(define-literal-syntax-class ->single-float^ (exact->inexact real->single-flonum))
(define-syntax-class (float-op tbl) (define-syntax-class (float-op tbl)
#:commit #:commit
(pattern i:id (pattern i:id
@ -34,27 +44,13 @@
#:with unsafe (begin (add-disappeared-use #'i) #:with unsafe (begin (add-disappeared-use #'i)
(dict-ref tbl #'i)))) (dict-ref tbl #'i))))
(define-syntax-class float-expr (define-syntax-class/specialize float-expr (subtyped-expr -Flonum))
#:commit (define-syntax-class/specialize single-float-expr (subtyped-expr -SingleFlonum))
(pattern e:expr (define-syntax-class/specialize int-expr (subtyped-expr -Integer))
#:when (subtypeof? #'e -Flonum) (define-syntax-class/specialize real-expr (subtyped-expr -Real))
#:with opt ((optimize) #'e))) (define-syntax-class/specialize unary-float-op (float-op unary-float-ops))
(define-syntax-class single-float-expr (define-syntax-class/specialize binary-float-op (float-op binary-float-ops))
#:commit (define-syntax-class/specialize binary-float-comp (float-op binary-float-comps))
(pattern e:expr
#:when (subtypeof? #'e -SingleFlonum)
#:with opt ((optimize) #'e)))
(define-syntax-class int-expr
#:commit
(pattern e:expr
#:when (subtypeof? #'e -Integer)
#:with opt ((optimize) #'e)))
(define-syntax-class real-expr
#:commit
(pattern e:expr
#:when (subtypeof? #'e -Real)
#:with opt ((optimize) #'e)))
;; if the result of an operation is of type float, its non float arguments ;; if the result of an operation is of type float, its non float arguments
;; can be promoted, and we can use unsafe float operations ;; can be promoted, and we can use unsafe float operations
@ -62,23 +58,22 @@
;; can result in float (as opposed to real) results ;; can result in float (as opposed to real) results
(define-syntax-class float-arg-expr (define-syntax-class float-arg-expr
#:commit #:commit
#:attributes (opt)
;; we can convert literals right away ;; we can convert literals right away
(pattern (quote n) (pattern (quote n)
#:when (and (real? (syntax->datum #'n)) #:when (and (real? (syntax->datum #'n))
(exact? (syntax->datum #'n))) (exact? (syntax->datum #'n)))
#:with opt #:with opt #`'#,(exact->inexact (syntax->datum #'n)))
(datum->syntax #'here (exact->inexact (syntax->datum #'n))))
(pattern e:fixnum-expr (pattern e:fixnum-expr
#:with opt #'(unsafe-fx->fl e.opt)) #:attr opt (delay #'(unsafe-fx->fl e.opt)))
(pattern e:int-expr (pattern e:int-expr
#:with opt #'(->fl e.opt)) #:attr opt (delay #'(->fl e.opt)))
(pattern e:float-expr (pattern :float-expr)
#:with opt #'e.opt)
;; reals within float expressions are not always valid to optimize because ;; reals within float expressions are not always valid to optimize because
;; of the exact 0 problem, but since float-opt-expr checks whether the ;; of the exact 0 problem, but since float-opt-expr checks whether the
;; surrounding expressing is of type Float and not just Real, this is safe ;; surrounding expressing is of type Float and not just Real, this is safe
(pattern e:real-expr (pattern e:real-expr
#:with opt #'(real->double-flonum e))) #:attr opt (delay #'(real->double-flonum e.opt))))
(define (log-float-real-missed-opt stx irritants) (define (log-float-real-missed-opt stx irritants)
(log-missed-optimization (log-missed-optimization
@ -90,21 +85,28 @@
" To fix, change the highlighted expression(s) to have Float type(s).")) " To fix, change the highlighted expression(s) to have Float type(s)."))
stx irritants)) stx irritants))
(define float-opt-msg "Float arithmetic specialization.") (define-syntax-rule (log-fl-opt opt-label)
(log-opt opt-label "Float arithmetic specialization."))
(define (maybe-exact-rational? stx)
(and (subtypeof? stx -Real)
(not (subtypeof? stx -Flonum))
(not (subtypeof? stx -Int))))
(define-syntax-class float-opt-expr (define-syntax-class float-opt-expr
#:commit #:commit
(pattern (#%plain-app (~var op (float-op unary-float-ops)) f:float-arg-expr) #:literal-sets (kernel-literals)
(pattern (#%plain-app op:unary-float-op f:float-arg-expr)
#:when (let* ([safe-to-opt? (subtypeof? this-syntax -Flonum)] #:when (let* ([safe-to-opt? (subtypeof? this-syntax -Flonum)]
[missed-optimization? (and (not safe-to-opt?) [missed-optimization? (and (not safe-to-opt?)
(in-real-layer? this-syntax))]) (in-real-layer? this-syntax))])
(when missed-optimization? (when missed-optimization?
(log-float-real-missed-opt this-syntax (list #'f))) (log-float-real-missed-opt this-syntax (list #'f)))
safe-to-opt?) safe-to-opt?)
#:with opt #:do [(log-fl-opt "unary float")]
(begin (log-optimization "unary float" float-opt-msg this-syntax) #:with opt #'(op.unsafe f.opt))
#'(op.unsafe f.opt))) (pattern (#%plain-app op:binary-float-op
(pattern (#%plain-app (~var op (float-op binary-float-ops))
;; for now, accept anything that can be coerced to float ;; for now, accept anything that can be coerced to float
;; finer-grained checking is done below ;; finer-grained checking is done below
f1:float-arg-expr f1:float-arg-expr
@ -183,110 +185,67 @@
"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." "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."
this-syntax extra-precision-subexprs))) this-syntax extra-precision-subexprs)))
safe-to-opt?) safe-to-opt?)
#:with opt #:do [(log-fl-opt "binary float")]
(begin (log-optimization "binary float" float-opt-msg this-syntax) #:with opt (n-ary->binary #'op.unsafe #'f1.opt #'f2.opt #'(fs.opt ...)))
(n-ary->binary #'op.unsafe #'f1.opt #'f2.opt #'(fs.opt ...)))) (pattern (#%plain-app op:binary-float-comp f1:float-expr f2:float-expr)
(pattern (#%plain-app (~var op (float-op binary-float-comps)) #:do [(log-fl-opt "binary float comp")]
f1:float-expr #:with opt #'(op.unsafe f1.opt f2.opt))
f2:float-expr) (pattern (#%plain-app op:binary-float-comp
#:with opt
(begin (log-optimization "binary float comp" float-opt-msg this-syntax)
#'(op.unsafe f1.opt f2.opt)))
(pattern (#%plain-app (~var op (float-op binary-float-comps))
f1:float-expr f1:float-expr
f2:float-expr f2:float-expr
fs:float-expr ...) fs:float-expr ...)
#:with opt #:do [(log-fl-opt "multi float comp")]
(begin (log-optimization "multi float comp" float-opt-msg this-syntax) #:with opt (n-ary-comp->binary #'op.unsafe #'f1.opt #'f2.opt #'(fs.opt ...)))
(n-ary-comp->binary #'op.unsafe #'f1.opt #'f2.opt #'(fs.opt ...))))
(pattern (#%plain-app (~and op (~literal -)) f:float-expr) (pattern (#%plain-app op:-^ f:float-expr)
#:with opt #:do [(log-fl-opt "unary float")]
(begin (log-optimization "unary float" float-opt-msg this-syntax) #:with opt #'(unsafe-fl* -1.0 f.opt))
(add-disappeared-use #'op) (pattern (#%plain-app op:/^ f:float-expr)
#'(unsafe-fl* -1.0 f.opt))) #:do [(log-fl-opt "unary float")]
(pattern (#%plain-app (~and op (~literal /)) f:float-expr) #:with opt #'(unsafe-fl/ 1.0 f.opt))
#:with opt (pattern (#%plain-app op:sqr^ f:float-expr)
(begin (log-optimization "unary float" float-opt-msg this-syntax) #:do [(log-fl-opt "unary float")]
(add-disappeared-use #'op) #:with opt #'(let ([tmp f.opt]) (unsafe-fl* tmp tmp)))
#'(unsafe-fl/ 1.0 f.opt)))
(pattern (#%plain-app (~and op (~literal sqr)) f:float-expr)
#:with opt
(begin (log-optimization "unary float" float-opt-msg this-syntax)
(add-disappeared-use #'op)
#'(let ([tmp f.opt]) (unsafe-fl* tmp tmp))))
;; we can optimize exact->inexact if we know we're giving it an Integer ;; we can optimize exact->inexact if we know we're giving it an Integer
(pattern (#%plain-app (~and op (~or (~literal exact->inexact) (pattern (#%plain-app op:->float^ n:int-expr)
(~literal real->double-flonum))) #:do [(log-fl-opt "int to float")]
n:int-expr) #:with opt #'(->fl n.opt))
#:with opt
(begin (log-optimization "int to float" float-opt-msg this-syntax)
(add-disappeared-use #'op)
#'(->fl n.opt)))
;; we can get rid of it altogether if we're giving it a float ;; we can get rid of it altogether if we're giving it a float
(pattern (#%plain-app (~and op (~or (~literal exact->inexact) (pattern (#%plain-app op:->float^ f:float-expr)
(~literal real->double-flonum))) #:do [(log-fl-opt "float to float")]
f:float-expr) #:with opt #'f.opt)
#:with opt
(begin (log-optimization "float to float" float-opt-msg this-syntax)
(add-disappeared-use #'op)
#'f.opt))
;; same for single-flonums ;; same for single-flonums
(pattern (#%plain-app (~and op (~or (~literal exact->inexact) (pattern (#%plain-app op:->single-float^ f:single-float-expr)
(~literal real->single-flonum))) #:do [(log-fl-opt "single-float to single-float")]
f:single-float-expr) #:with opt #'f.opt)
#:with opt
(begin (log-optimization "single-float to single-float"
float-opt-msg this-syntax)
(add-disappeared-use #'op)
#'f.opt))
(pattern (#%plain-app (~and op (~literal zero?)) f:float-expr) (pattern (#%plain-app op:zero?^ f:float-expr)
#:with opt #:do [(log-fl-opt "float zero?")]
(begin (log-optimization "float zero?" float-opt-msg this-syntax) #:with opt #'(unsafe-fl= f.opt 0.0))
(add-disappeared-use #'op)
#'(unsafe-fl= f.opt 0.0)))
(pattern (#%plain-app (~and op (~literal add1)) n:float-expr) (pattern (#%plain-app op:add1^ n:float-expr)
#:with opt #:do [(log-fl-opt "float add1")]
(begin (log-optimization "float add1" float-opt-msg this-syntax) #:with opt #'(unsafe-fl+ n.opt 1.0))
(add-disappeared-use #'op) (pattern (#%plain-app op:sub1^ n:float-expr)
#'(unsafe-fl+ n.opt 1.0))) #:do [(log-fl-opt "float sub1")]
(pattern (#%plain-app (~and op (~literal sub1)) n:float-expr) #:with opt #'(unsafe-fl- n.opt 1.0))
#:with opt
(begin (log-optimization "float sub1" float-opt-msg this-syntax)
(add-disappeared-use #'op)
#'(unsafe-fl- n.opt 1.0)))
;; warn about (potentially) exact real arithmetic, in general ;; warn about (potentially) exact real arithmetic, in general
;; Note: These patterns don't perform optimization. They only produce logging ;; Note: These patterns don't perform optimization. They only produce logging
;; for consumption by Optimization Coach. ;; for consumption by Optimization Coach.
(pattern (#%plain-app (~var op (float-op binary-float-ops)) (pattern (#%plain-app op:binary-float-op n:opt-expr ...)
n ...) #:when (maybe-exact-rational? this-syntax)
#:when (maybe-exact-rational? this-syntax) #:do [(log-opt-info "exact real arith")]
#:with opt #:with opt #'(op n.opt ...))
(begin (log-optimization-info "exact real arith" (pattern (#%plain-app op:binary-float-comp n:opt-expr ...)
this-syntax) ;; can't look at return type, since it's always bool
this-syntax)) #:when (andmap maybe-exact-rational? (syntax->list #'(n ...)))
(pattern (#%plain-app (~var op (float-op binary-float-comps)) #:do [(log-opt-info "exact real arith")]
n ...) #:with opt #'(op n.opt ...))
;; can't look at return type, since it's always bool (pattern (#%plain-app op:unary-float-op n:opt-expr ...)
#:when (andmap maybe-exact-rational? (syntax->list #'(n ...))) #:when (maybe-exact-rational? this-syntax)
#:with opt #:do [(log-opt-info "exact real arith")]
(begin (log-optimization-info "exact real arith" #:with opt #'(op n.opt ...))
this-syntax)
this-syntax))
(pattern (#%plain-app (~var op (float-op unary-float-ops))
n ...)
#:when (maybe-exact-rational? this-syntax)
#:with opt
(begin (log-optimization-info "exact real arith"
this-syntax)
this-syntax))
) )
(define (maybe-exact-rational? stx)
(and (subtypeof? stx -Real)
(not (subtypeof? stx -Flonum))
(not (subtypeof? stx -Int))))

View File

@ -1,15 +1,13 @@
#;#; #;#;
#<<END #<<END
TR missed opt: fixnum.rkt 37:0 (+ (ann z Fixnum) 234) -- out of fixnum range TR missed opt: fixnum.rkt 35:0 (+ (ann z Fixnum) 234) -- out of fixnum range
TR missed opt: fixnum.rkt 38:0 (* (ann x Index) (ann y Index)) -- out of fixnum range TR missed opt: fixnum.rkt 36:0 (* (ann x Index) (ann y Index)) -- out of fixnum range
TR missed opt: fixnum.rkt 41:0 (+ (+ 300 301) (+ 301 302)) -- out of fixnum range TR missed opt: fixnum.rkt 39:0 (+ (+ 300 301) (+ 301 302)) -- out of fixnum range
TR opt: fixnum.rkt 34:10 (* x y) -- fixnum bounded expr TR opt: fixnum.rkt 32:10 (* x y) -- fixnum bounded expr
TR opt: fixnum.rkt 41:15 (+ 301 302) -- fixnum bounded expr TR opt: fixnum.rkt 39:15 (+ 301 302) -- fixnum bounded expr
TR opt: fixnum.rkt 41:15 (+ 301 302) -- fixnum bounded expr TR opt: fixnum.rkt 39:3 (+ 300 301) -- fixnum bounded expr
TR opt: fixnum.rkt 41:3 (+ 300 301) -- fixnum bounded expr TR opt: fixnum.rkt 40:17 (+ 301 302) -- fixnum bounded expr
TR opt: fixnum.rkt 41:3 (+ 300 301) -- fixnum bounded expr TR opt: fixnum.rkt 40:5 (+ 300 301) -- fixnum bounded expr
TR opt: fixnum.rkt 42:17 (+ 301 302) -- fixnum bounded expr
TR opt: fixnum.rkt 42:5 (+ 300 301) -- fixnum bounded expr
END END
#<<END #<<END
468 468

View File

@ -1,24 +1,23 @@
#;#; #;#;
#<<END #<<END
TR info: precision-loss.rkt 39:3 (* 3/4 2/3) -- exact real arith TR info: precision-loss.rkt 38:3 (* 3/4 2/3) -- exact real arith
TR info: precision-loss.rkt 43:3 (- 3/4) -- exact real arith TR info: precision-loss.rkt 42:3 (- 3/4) -- exact real arith
TR info: precision-loss.rkt 45:39 (+ 1/4 3/4) -- exact real arith TR info: precision-loss.rkt 44:39 (+ 1/4 3/4) -- exact real arith
TR info: precision-loss.rkt 45:39 (+ 1/4 3/4) -- exact real arith TR info: precision-loss.rkt 50:0 (* (* (r 3/4) 2/3) (car (list (* 2.0 (* (r 3/4) 2/3)))) 2.0) -- exact real arith
TR info: precision-loss.rkt 51:0 (* (* (r 3/4) 2/3) (car (list (* 2.0 (* (r 3/4) 2/3)))) 2.0) -- exact real arith TR info: precision-loss.rkt 50:3 (* (r 3/4) 2/3) -- exact real arith
TR info: precision-loss.rkt 51:3 (* (r 3/4) 2/3) -- exact real arith TR info: precision-loss.rkt 51:14 (* 2.0 (* (r 3/4) 2/3)) -- exact real arith
TR info: precision-loss.rkt 52:14 (* 2.0 (* (r 3/4) 2/3)) -- exact real arith TR info: precision-loss.rkt 51:21 (* (r 3/4) 2/3) -- exact real arith
TR info: precision-loss.rkt 52:21 (* (r 3/4) 2/3) -- exact real arith TR missed opt: precision-loss.rkt 38:0 (+ (* 3/4 2/3) 2.0) -- exact ops inside float expr -- caused by: 38:3 (* 3/4 2/3)
TR missed opt: precision-loss.rkt 39:0 (+ (* 3/4 2/3) 2.0) -- exact ops inside float expr -- caused by: 39:3 (* 3/4 2/3) TR missed opt: precision-loss.rkt 42:0 (+ (- 3/4) 2.0) -- exact ops inside float expr -- caused by: 42:3 (- 3/4)
TR missed opt: precision-loss.rkt 43:0 (+ (- 3/4) 2.0) -- exact ops inside float expr -- caused by: 43:3 (- 3/4) TR missed opt: precision-loss.rkt 44:0 (+ (vector-ref (quote #(2/3 1/2 3/4)) (assert (+ 1/4 3/4) exact-integer?)) 2.0) -- all args float-arg-expr, result not Float -- caused by: 44:3 (vector-ref (quote #(2/3 1/2 3/4)) (assert (+ 1/4 3/4) exact-integer?))
TR missed opt: precision-loss.rkt 45:0 (+ (vector-ref (quote #(2/3 1/2 3/4)) (assert (+ 1/4 3/4) exact-integer?)) 2.0) -- all args float-arg-expr, result not Float -- caused by: 45:3 (vector-ref (quote #(2/3 1/2 3/4)) (assert (+ 1/4 3/4) exact-integer?)) TR missed opt: precision-loss.rkt 50:0 (* (* (r 3/4) 2/3) (car (list (* 2.0 (* (r 3/4) 2/3)))) 2.0) -- all args float-arg-expr, result not Float -- caused by: 50:3 (* (r 3/4) 2/3), 51:3 (car (list (* 2.0 (* (r 3/4) 2/3))))
TR missed opt: precision-loss.rkt 51:0 (* (* (r 3/4) 2/3) (car (list (* 2.0 (* (r 3/4) 2/3)))) 2.0) -- all args float-arg-expr, result not Float -- caused by: 51:3 (* (r 3/4) 2/3), 52:3 (car (list (* 2.0 (* (r 3/4) 2/3)))) TR missed opt: precision-loss.rkt 50:3 (* (r 3/4) 2/3) -- all args float-arg-expr, result not Float -- caused by: 50:6 (r 3/4), 50:14 2/3
TR missed opt: precision-loss.rkt 51:3 (* (r 3/4) 2/3) -- all args float-arg-expr, result not Float -- caused by: 51:6 (r 3/4), 51:14 2/3 TR missed opt: precision-loss.rkt 51:14 (* 2.0 (* (r 3/4) 2/3)) -- all args float-arg-expr, result not Float -- caused by: 51:21 (* (r 3/4) 2/3)
TR missed opt: precision-loss.rkt 52:14 (* 2.0 (* (r 3/4) 2/3)) -- all args float-arg-expr, result not Float -- caused by: 52:21 (* (r 3/4) 2/3) TR missed opt: precision-loss.rkt 51:21 (* (r 3/4) 2/3) -- all args float-arg-expr, result not Float -- caused by: 51:24 (r 3/4), 51:32 2/3
TR missed opt: precision-loss.rkt 52:21 (* (r 3/4) 2/3) -- all args float-arg-expr, result not Float -- caused by: 52:24 (r 3/4), 52:32 2/3 TR opt: precision-loss.rkt 38:0 (+ (* 3/4 2/3) 2.0) -- binary float
TR opt: precision-loss.rkt 39:0 (+ (* 3/4 2/3) 2.0) -- binary float TR opt: precision-loss.rkt 40:0 (+ 3/4 2.0) -- binary float
TR opt: precision-loss.rkt 41:0 (+ 3/4 2.0) -- binary float TR opt: precision-loss.rkt 42:0 (+ (- 3/4) 2.0) -- binary float
TR opt: precision-loss.rkt 43:0 (+ (- 3/4) 2.0) -- binary float TR opt: precision-loss.rkt 51:3 (car (list (* 2.0 (* (r 3/4) 2/3)))) -- pair
TR opt: precision-loss.rkt 52:3 (car (list (* 2.0 (* (r 3/4) 2/3)))) -- pair
END END
#<<END #<<END
2.5 2.5

View File

@ -1,11 +1,10 @@
#;#; #;#;
#<<END #<<END
TR opt: float-complex-fixnum.rkt 18:0 (+ (modulo 2 1) 1.0+2.0i 3.0+6.0i) -- unboxed binary float complex TR opt: float-complex-fixnum.rkt 17:0 (+ (modulo 2 1) 1.0+2.0i 3.0+6.0i) -- unboxed binary float complex
TR opt: float-complex-fixnum.rkt 18:16 1.0+2.0i -- unboxed literal TR opt: float-complex-fixnum.rkt 17:16 1.0+2.0i -- unboxed literal
TR opt: float-complex-fixnum.rkt 18:25 3.0+6.0i -- unboxed literal TR opt: float-complex-fixnum.rkt 17:25 3.0+6.0i -- unboxed literal
TR opt: float-complex-fixnum.rkt 18:3 (modulo 2 1) -- binary nonzero fixnum TR opt: float-complex-fixnum.rkt 17:3 (modulo 2 1) -- binary nonzero fixnum
TR opt: float-complex-fixnum.rkt 18:3 (modulo 2 1) -- binary nonzero fixnum TR opt: float-complex-fixnum.rkt 17:3 (modulo 2 1) -- float-arg-expr in complex ops
TR opt: float-complex-fixnum.rkt 18:3 (modulo 2 1) -- float-arg-expr in complex ops
END END
#<<END #<<END
4.0+8.0i 4.0+8.0i

View File

@ -1,16 +1,12 @@
#;#; #;#;
#<<END #<<END
TR info: float-complex-sin.rkt 25:13 (sin (* t 6.28)) -- exact real arith TR info: float-complex-sin.rkt 21:13 (sin (* t 6.28)) -- exact real arith
TR info: float-complex-sin.rkt 25:13 (sin (* t 6.28)) -- exact real arith TR info: float-complex-sin.rkt 21:18 (* t 6.28) -- exact real arith
TR info: float-complex-sin.rkt 25:18 (* t 6.28) -- exact real arith TR missed opt: float-complex-sin.rkt 21:13 (sin (* t 6.28)) -- all args float-arg-expr, result not Float -- caused by: 21:18 (* t 6.28)
TR info: float-complex-sin.rkt 25:18 (* t 6.28) -- exact real arith TR missed opt: float-complex-sin.rkt 21:18 (* t 6.28) -- all args float-arg-expr, result not Float -- caused by: 21:21 t
TR missed opt: float-complex-sin.rkt 25:13 (sin (* t 6.28)) -- all args float-arg-expr, result not Float -- caused by: 25:18 (* t 6.28) TR opt: float-complex-sin.rkt 21:10 (+ (sin (* t 6.28)) 0.0+0.0i) -- unboxed binary float complex
TR missed opt: float-complex-sin.rkt 25:13 (sin (* t 6.28)) -- all args float-arg-expr, result not Float -- caused by: 25:18 (* t 6.28) TR opt: float-complex-sin.rkt 21:13 (sin (* t 6.28)) -- float-arg-expr in complex ops
TR missed opt: float-complex-sin.rkt 25:18 (* t 6.28) -- all args float-arg-expr, result not Float -- caused by: 25:21 t TR opt: float-complex-sin.rkt 21:30 0.0+0.0i -- unboxed literal
TR missed opt: float-complex-sin.rkt 25:18 (* t 6.28) -- all args float-arg-expr, result not Float -- caused by: 25:21 t
TR opt: float-complex-sin.rkt 25:10 (+ (sin (* t 6.28)) 0.0+0.0i) -- unboxed binary float complex
TR opt: float-complex-sin.rkt 25:13 (sin (* t 6.28)) -- float-arg-expr in complex ops
TR opt: float-complex-sin.rkt 25:30 0.0+0.0i -- unboxed literal
END END
#<<END #<<END
-0.0031853017931379904+0.0i -0.0031853017931379904+0.0i