\[\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: 10.7 s
Input Error: 25.0
Output Error: 22.5
Log:
Profile: 🕒
\(\begin{cases} \frac{1}{\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}} & \text{when } c \le 6.017005997385073 \cdot 10^{+179} \\ {\left(\frac{\sqrt{c \cdot b - d \cdot a}}{\sqrt{c^2 + d^2}^*}\right)}^2 & \text{when } c \le 1.9805038059332254 \cdot 10^{+227} \\ 0 & \text{otherwise} \end{cases}\)

    if c < 6.017005997385073e+179

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      24.0
    2. Using strategy rm
      24.0
    3. Applied clear-num to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\frac{1}{\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}}}\]
      24.2

    if 6.017005997385073e+179 < c < 1.9805038059332254e+227

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      49.7
    2. Using strategy rm
      49.7
    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}}\]
      49.7
    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}\]
      49.7
    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}\]
      49.7
    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

    if 1.9805038059332254e+227 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      31.4
    2. Applied taylor to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2} \leadsto 0\]
      0
    3. Taylor expanded around 0 to get
      \[\color{red}{0} \leadsto \color{blue}{0}\]
      0

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