\[\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: 12.6 s
Input Error: 25.7
Output Error: 14.9
Log:
Profile: 🕒
\(\begin{cases} \frac{x.im}{y.re} & \text{when } y.re \le -4.045938800007209 \cdot 10^{+150} \\ \frac{1}{\frac{{y.re}^2 + y.im \cdot y.im}{y.re \cdot x.im - x.re \cdot y.im}} & \text{when } y.re \le 6.209412377058245 \cdot 10^{+96} \\ \frac{x.im}{y.re} - \frac{x.re \cdot y.im}{y.re \cdot y.re} & \text{otherwise} \end{cases}\)

    if y.re < -4.045938800007209e+150

    1. Started with
      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
      41.6
    2. Using strategy rm
      41.6
    3. Applied clear-num 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{1}{\frac{y.re \cdot y.re + y.im \cdot y.im}{x.im \cdot y.re - x.re \cdot y.im}}}\]
      41.6
    4. Applied simplify to get
      \[\frac{1}{\color{red}{\frac{y.re \cdot y.re + y.im \cdot y.im}{x.im \cdot y.re - x.re \cdot y.im}}} \leadsto \frac{1}{\color{blue}{\frac{{y.re}^2 + y.im \cdot y.im}{y.re \cdot x.im - x.re \cdot y.im}}}\]
      41.6
    5. Using strategy rm
      41.6
    6. Applied add-cbrt-cube to get
      \[\frac{1}{\frac{{y.re}^2 + y.im \cdot y.im}{\color{red}{y.re \cdot x.im - x.re \cdot y.im}}} \leadsto \frac{1}{\frac{{y.re}^2 + y.im \cdot y.im}{\color{blue}{\sqrt[3]{{\left(y.re \cdot x.im - x.re \cdot y.im\right)}^3}}}}\]
      51.5
    7. Applied add-cbrt-cube to get
      \[\frac{1}{\frac{\color{red}{{y.re}^2 + y.im \cdot y.im}}{\sqrt[3]{{\left(y.re \cdot x.im - x.re \cdot y.im\right)}^3}}} \leadsto \frac{1}{\frac{\color{blue}{\sqrt[3]{{\left({y.re}^2 + y.im \cdot y.im\right)}^3}}}{\sqrt[3]{{\left(y.re \cdot x.im - x.re \cdot y.im\right)}^3}}}\]
      51.6
    8. Applied cbrt-undiv to get
      \[\frac{1}{\color{red}{\frac{\sqrt[3]{{\left({y.re}^2 + y.im \cdot y.im\right)}^3}}{\sqrt[3]{{\left(y.re \cdot x.im - x.re \cdot y.im\right)}^3}}}} \leadsto \frac{1}{\color{blue}{\sqrt[3]{\frac{{\left({y.re}^2 + y.im \cdot y.im\right)}^3}{{\left(y.re \cdot x.im - x.re \cdot y.im\right)}^3}}}}\]
      51.6
    9. Applied simplify to get
      \[\frac{1}{\sqrt[3]{\color{red}{\frac{{\left({y.re}^2 + y.im \cdot y.im\right)}^3}{{\left(y.re \cdot x.im - x.re \cdot y.im\right)}^3}}}} \leadsto \frac{1}{\sqrt[3]{\color{blue}{{\left(\frac{{y.re}^2 + y.im \cdot y.im}{y.re \cdot x.im - x.re \cdot y.im}\right)}^3}}}\]
      41.9
    10. Applied taylor to get
      \[\frac{1}{\sqrt[3]{{\left(\frac{{y.re}^2 + y.im \cdot y.im}{y.re \cdot x.im - x.re \cdot y.im}\right)}^3}} \leadsto \frac{x.im}{y.re}\]
      0
    11. Taylor expanded around 0 to get
      \[\color{red}{\frac{x.im}{y.re}} \leadsto \color{blue}{\frac{x.im}{y.re}}\]
      0
    12. Applied simplify to get
      \[\frac{x.im}{y.re} \leadsto \frac{x.im}{y.re}\]
      0

    13. Applied final simplification

    if -4.045938800007209e+150 < y.re < 6.209412377058245e+96

    1. Started with
      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
      18.4
    2. Using strategy rm
      18.4
    3. Applied clear-num 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{1}{\frac{y.re \cdot y.re + y.im \cdot y.im}{x.im \cdot y.re - x.re \cdot y.im}}}\]
      18.5
    4. Applied simplify to get
      \[\frac{1}{\color{red}{\frac{y.re \cdot y.re + y.im \cdot y.im}{x.im \cdot y.re - x.re \cdot y.im}}} \leadsto \frac{1}{\color{blue}{\frac{{y.re}^2 + y.im \cdot y.im}{y.re \cdot x.im - x.re \cdot y.im}}}\]
      18.5

    if 6.209412377058245e+96 < y.re

    1. Started with
      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\]
      41.7
    2. Using strategy rm
      41.7
    3. Applied div-inv 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}{\left(x.im \cdot y.re - x.re \cdot y.im\right) \cdot \frac{1}{y.re \cdot y.re + y.im \cdot y.im}}\]
      41.7
    4. Using strategy rm
      41.7
    5. Applied add-cube-cbrt to get
      \[\left(x.im \cdot y.re - x.re \cdot y.im\right) \cdot \color{red}{\frac{1}{y.re \cdot y.re + y.im \cdot y.im}} \leadsto \left(x.im \cdot y.re - x.re \cdot y.im\right) \cdot \color{blue}{{\left(\sqrt[3]{\frac{1}{y.re \cdot y.re + y.im \cdot y.im}}\right)}^3}\]
      41.8
    6. Applied taylor to get
      \[\left(x.im \cdot y.re - x.re \cdot y.im\right) \cdot {\left(\sqrt[3]{\frac{1}{y.re \cdot y.re + y.im \cdot y.im}}\right)}^3 \leadsto \frac{x.im}{y.re} - \frac{y.im \cdot x.re}{{y.re}^2}\]
      12.4
    7. Taylor expanded around inf to get
      \[\color{red}{\frac{x.im}{y.re} - \frac{y.im \cdot x.re}{{y.re}^2}} \leadsto \color{blue}{\frac{x.im}{y.re} - \frac{y.im \cdot x.re}{{y.re}^2}}\]
      12.4
    8. Applied simplify to get
      \[\frac{x.im}{y.re} - \frac{y.im \cdot x.re}{{y.re}^2} \leadsto \frac{x.im}{y.re} - \frac{x.re \cdot y.im}{y.re \cdot y.re}\]
      12.4

    9. Applied final simplification

  1. 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))))