From 36a39f7e5d79f60420372eba05ea1859f672ffd1 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 9 Nov 2015 14:50:27 -0600 Subject: [PATCH] Simplify interface. --- typed-racket-lib/typed-racket/optimizer/float-complex.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typed-racket-lib/typed-racket/optimizer/float-complex.rkt b/typed-racket-lib/typed-racket/optimizer/float-complex.rkt index 4f86c525..046326ac 100644 --- a/typed-racket-lib/typed-racket/optimizer/float-complex.rkt +++ b/typed-racket-lib/typed-racket/optimizer/float-complex.rkt @@ -63,7 +63,7 @@ (define non-float-table (make-hash)) (define (as-non-float stx) (hash-ref non-float-table stx #f)) -(define (mark-as-non-float stx orig) +(define (mark-as-non-float stx [orig stx]) (hash-set! non-float-table stx orig) stx) @@ -80,7 +80,7 @@ ;; the result (let ([new-o (quasisyntax/loc this-syntax (#,+ #,o-nf #,c1-nf))]) - (loop (mark-as-non-float new-o new-o) + (loop (mark-as-non-float new-o) (stx-cdr cs))) ;; we've hit floats, can start coercing (n-ary->binary this-syntax unsafe (cons #`(real->double-flonum #,o) cs))))) @@ -131,7 +131,7 @@ ;; (implies that they're both real) (unless both-real? (int-err "optimizer: complex division, non-floats not real")) - #`[(#,(mark-as-non-float res-real res-real) + #`[(#,(mark-as-non-float res-real) #,(mark-as-real res-imag)) ; this case implies real (values (/ #,first-non-float #,second-non-float) 0.0)]] @@ -285,7 +285,7 @@ ;; (implies that they're both real) (unless (and o-real? e-real?) (int-err "optimizer: complex division, non-floats not real")) - (mark-as-non-float (car rs) (car rs)) + (mark-as-non-float (car rs)) #`(* #,o-nf #,e-nf)] [(or o-real? e-real?) #`(unsafe-fl*