Changeset 10017
- Timestamp:
- 01/09/04 04:20:59 (5 years ago)
- Files:
-
- 1 modified
-
trunk/src/compiler/float-tran.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compiler/float-tran.lisp
r9790 r9990 23 23 (defknown %double-float (real) double-float (movable foldable flushable)) 24 24 25 (deftransform float ((n &optional f) (* &optional single-float) * 26 :when :both) 25 (deftransform float ((n prototype) (* single-float) * :when :both) 27 26 '(%single-float n)) 28 27 29 (deftransform float ((n f) (* double-float) * :when :both)28 (deftransform float ((n prototype) (* double-float) * :when :both) 30 29 '(%double-float n)) 30 31 (deftransform float ((n) *) 32 `(if (floatp n) n (%single-float n))) 31 33 32 34 (deftransform %single-float ((n) (single-float) * :when :both) … … 1262 1264 '(complex (- (realpart w) z) (imagpart w))) 1263 1265 (deftransform - ((z w) (real (complex ,type)) *) 1264 '(complex (- z (realpart w)) (- (imagpart w)))) 1266 ;; The 0 for the imaginary part is needed so we get 1267 ;; the correct signed zero. 1268 '(complex (- z (realpart w)) (- 0 (imagpart w)))) 1265 1269 ;; Multiply and divide two complex numbers 1266 1270 (deftransform * ((x y) ((complex ,type) (complex ,type)) *) … … 1338 1342 (deftransform = ((w z) (real (complex ,type)) *) 1339 1343 '(and (= (realpart z) w) (zerop (imagpart z)))) 1344 (deftransform - ((z w) (real (complex ,type)) *) 1345 ;; The 0 for the imaginary part is needed so we get 1346 ;; the correct signed zero. 1347 '(complex (- z (realpart w)) (- 0 (imagpart w)))) 1340 1348 ))) 1341 1349
