\[\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.5 s
Input Error: 25.7
Output Error: 14.8
Log:
Profile: 🕒
\(\begin{cases} \frac{b}{c} & \text{when } c \le -4.045938800007209 \cdot 10^{+150} \\ \frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2} & \text{when } c \le 6.209412377058245 \cdot 10^{+96} \\ \frac{b}{c} - \frac{a \cdot d}{c \cdot c} & \text{otherwise} \end{cases}\)

    if c < -4.045938800007209e+150

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      41.6
    2. Using strategy rm
      41.6
    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}}}\]
      41.6
    4. Using strategy rm
      41.6
    5. Applied add-cbrt-cube to get
      \[\frac{1}{\color{red}{\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}}} \leadsto \frac{1}{\color{blue}{\sqrt[3]{{\left(\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}\right)}^3}}}\]
      41.9
    6. Applied taylor to get
      \[\frac{1}{\sqrt[3]{{\left(\frac{{c}^2 + {d}^2}{b \cdot c - a \cdot d}\right)}^3}} \leadsto \frac{b}{c}\]
      0
    7. Taylor expanded around 0 to get
      \[\color{red}{\frac{b}{c}} \leadsto \color{blue}{\frac{b}{c}}\]
      0
    8. Applied simplify to get
      \[\frac{b}{c} \leadsto \frac{b}{c}\]
      0

    9. Applied final simplification

    if -4.045938800007209e+150 < c < 6.209412377058245e+96

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      18.4

    if 6.209412377058245e+96 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      41.7
    2. Using strategy rm
      41.7
    3. Applied div-inv to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}} \leadsto \color{blue}{\left(b \cdot c - a \cdot d\right) \cdot \frac{1}{{c}^2 + {d}^2}}\]
      41.7
    4. Using strategy rm
      41.7
    5. Applied add-cbrt-cube to get
      \[\left(b \cdot c - a \cdot d\right) \cdot \color{red}{\frac{1}{{c}^2 + {d}^2}} \leadsto \left(b \cdot c - a \cdot d\right) \cdot \color{blue}{\sqrt[3]{{\left(\frac{1}{{c}^2 + {d}^2}\right)}^3}}\]
      48.6
    6. Applied taylor to get
      \[\left(b \cdot c - a \cdot d\right) \cdot \sqrt[3]{{\left(\frac{1}{{c}^2 + {d}^2}\right)}^3} \leadsto \frac{b}{c} - \frac{d \cdot a}{{c}^2}\]
      12.4
    7. Taylor expanded around inf to get
      \[\color{red}{\frac{b}{c} - \frac{d \cdot a}{{c}^2}} \leadsto \color{blue}{\frac{b}{c} - \frac{d \cdot a}{{c}^2}}\]
      12.4
    8. Applied simplify to get
      \[\frac{b}{c} - \frac{d \cdot a}{{c}^2} \leadsto \frac{b}{c} - \frac{a \cdot d}{c \cdot c}\]
      12.4

    9. Applied final simplification

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