\[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
Test:
Complex division, imag part
Bits:
128 bits
Bits error versus a
Bits error versus b
Bits error versus c
Bits error versus d
Time: 11.5 s
Input Error: 24.5
Output Error: 21.0
Log:
Profile: 🕒
\(\begin{cases} \frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} & \text{when } d \le -0.004845025334922612 \\ \frac{b}{\frac{{c}^2 + {d}^2}{c}} - \frac{a \cdot d}{{c}^2 + {d}^2} & \text{when } d \le 5.0895531305241454 \cdot 10^{+157} \\ {\left(\frac{\sqrt{c \cdot b - d \cdot a}}{\sqrt{c^2 + d^2}^*}\right)}^2 & \text{otherwise} \end{cases}\)

    if d < -0.004845025334922612

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      32.2
    2. Using strategy rm
      32.2
    3. Applied div-sub to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a \cdot d}{{c}^2 + {d}^2}}\]
      32.2
    4. Using strategy rm
      32.2
    5. Applied associate-/l* to get
      \[\frac{b \cdot c}{{c}^2 + {d}^2} - \color{red}{\frac{a \cdot d}{{c}^2 + {d}^2}} \leadsto \frac{b \cdot c}{{c}^2 + {d}^2} - \color{blue}{\frac{a}{\frac{{c}^2 + {d}^2}{d}}}\]
      28.7

    if -0.004845025334922612 < d < 5.0895531305241454e+157

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      19.1
    2. Using strategy rm
      19.1
    3. Applied div-sub to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\frac{b \cdot c}{{c}^2 + {d}^2} - \frac{a \cdot d}{{c}^2 + {d}^2}}\]
      19.2
    4. Using strategy rm
      19.2
    5. Applied associate-/l* to get
      \[\color{red}{\frac{b \cdot c}{{c}^2 + {d}^2}} - \frac{a \cdot d}{{c}^2 + {d}^2} \leadsto \color{blue}{\frac{b}{\frac{{c}^2 + {d}^2}{c}}} - \frac{a \cdot d}{{c}^2 + {d}^2}\]
      17.0

    if 5.0895531305241454e+157 < d

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      44.2
    2. Using strategy rm
      44.2
    3. Applied add-sqr-sqrt to get
      \[\frac{b \cdot c - a \cdot d}{\color{red}{{c}^2 + {d}^2}} \leadsto \frac{b \cdot c - a \cdot d}{\color{blue}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2}}\]
      44.2
    4. Applied add-sqr-sqrt to get
      \[\frac{\color{red}{b \cdot c - a \cdot d}}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2} \leadsto \frac{\color{blue}{{\left(\sqrt{b \cdot c - a \cdot d}\right)}^2}}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2}\]
      44.2
    5. Applied square-undiv to get
      \[\color{red}{\frac{{\left(\sqrt{b \cdot c - a \cdot d}\right)}^2}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2}} \leadsto \color{blue}{{\left(\frac{\sqrt{b \cdot c - a \cdot d}}{\sqrt{{c}^2 + {d}^2}}\right)}^2}\]
      44.2
    6. Applied simplify to get
      \[{\color{red}{\left(\frac{\sqrt{b \cdot c - a \cdot d}}{\sqrt{{c}^2 + {d}^2}}\right)}}^2 \leadsto {\color{blue}{\left(\frac{\sqrt{c \cdot b - d \cdot a}}{\sqrt{c^2 + d^2}^*}\right)}}^2\]
      27.4

  1. Removed slow pow expressions

Original test:


(lambda ((a default) (b default) (c default) (d default))
  #:name "Complex division, imag part"
  (/ (- (* b c) (* a d)) (+ (sqr c) (sqr d)))
  #:target
  (if (< (fabs d) (fabs c)) (/ (- b (* a (/ d c))) (+ c (* d (/ d c)))) (/ (+ (- a) (* b (/ c d))) (+ d (* c (/ c d))))))