\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
Test:
_divideComplex, imaginary part
Bits:
128 bits
Bits error versus x.re
Bits error versus x.im
Bits error versus y.re
Bits error versus y.im
Time: 11.0 s
Input Error: 25.4
Output Error: 22.8
Log:
Profile: 🕒
\(\frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \frac{x.re}{1} \cdot \frac{y.im}{y.re \cdot y.re + {y.im}^2}\)
  1. Started with
    \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
    25.4
  2. Using strategy rm
    25.4
  3. Applied div-sub to get
    \[\color{red}{\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}} \leadsto \color{blue}{\frac{x.im \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}}\]
    25.4
  4. Using strategy rm
    25.4
  5. Applied *-un-lft-identity to get
    \[\frac{x.im \cdot y.re}{\color{red}{y.re \cdot y.re + y.im \cdot y.im}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leadsto \frac{x.im \cdot y.re}{\color{blue}{1 \cdot \left(y.re \cdot y.re + y.im \cdot y.im\right)}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
    25.4
  6. Applied times-frac to get
    \[\color{red}{\frac{x.im \cdot y.re}{1 \cdot \left(y.re \cdot y.re + y.im \cdot y.im\right)}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leadsto \color{blue}{\frac{x.im}{1} \cdot \frac{y.re}{y.re \cdot y.re + y.im \cdot y.im}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
    24.3
  7. Applied simplify to get
    \[\frac{x.im}{1} \cdot \color{red}{\frac{y.re}{y.re \cdot y.re + y.im \cdot y.im}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leadsto \frac{x.im}{1} \cdot \color{blue}{\frac{y.re}{{y.re}^2 + y.im \cdot y.im}} - \frac{x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
    24.3
  8. Using strategy rm
    24.3
  9. Applied *-un-lft-identity to get
    \[\frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \frac{x.re \cdot y.im}{\color{red}{y.re \cdot y.re + y.im \cdot y.im}} \leadsto \frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \frac{x.re \cdot y.im}{\color{blue}{1 \cdot \left(y.re \cdot y.re + y.im \cdot y.im\right)}}\]
    24.3
  10. Applied times-frac to get
    \[\frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \color{red}{\frac{x.re \cdot y.im}{1 \cdot \left(y.re \cdot y.re + y.im \cdot y.im\right)}} \leadsto \frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \color{blue}{\frac{x.re}{1} \cdot \frac{y.im}{y.re \cdot y.re + y.im \cdot y.im}}\]
    22.8
  11. Applied simplify to get
    \[\frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \frac{x.re}{1} \cdot \color{red}{\frac{y.im}{y.re \cdot y.re + y.im \cdot y.im}} \leadsto \frac{x.im}{1} \cdot \frac{y.re}{{y.re}^2 + y.im \cdot y.im} - \frac{x.re}{1} \cdot \color{blue}{\frac{y.im}{y.re \cdot y.re + {y.im}^2}}\]
    22.8

  12. Removed slow pow expressions

Original test:


(lambda ((x.re default) (x.im default) (y.re default) (y.im default))
  #:name "_divideComplex, imaginary part"
  (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))