\[\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: 13.6 s
Input Error: 13.0
Output Error: 2.6
Log:
Profile: 🕒
\(\begin{cases} \frac{b}{c} - \frac{d}{c} \cdot \frac{a}{c} & \text{when } c \le -2.668639f+09 \\ {\left(\sqrt[3]{\frac{b \cdot c - a \cdot d}{{c}^2 + {\left(\left|d\right|\right)}^2}}\right)}^3 & \text{when } c \le -4.7155537f-14 \\ \frac{b}{\left|d\right|} \cdot \frac{c}{\left|d\right|} - \frac{a}{\left|d\right|} \cdot \frac{d}{\left|d\right|} & \text{when } c \le 4.2462024f-16 \\ {\left(\sqrt[3]{\frac{b \cdot c - a \cdot d}{{c}^2 + {\left(\left|d\right|\right)}^2}}\right)}^3 & \text{when } c \le 3.5788512f+20 \\ \frac{b}{c} - \frac{d}{c} \cdot \frac{a}{c} & \text{otherwise} \end{cases}\)

    if c < -2.668639f+09 or 3.5788512f+20 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      20.8
    2. Using strategy rm
      20.8
    3. Applied add-sqr-sqrt to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + \color{red}{{d}^2}} \leadsto \frac{b \cdot c - a \cdot d}{{c}^2 + \color{blue}{{\left(\sqrt{{d}^2}\right)}^2}}\]
      20.8
    4. Applied simplify to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {\color{red}{\left(\sqrt{{d}^2}\right)}}^2} \leadsto \frac{b \cdot c - a \cdot d}{{c}^2 + {\color{blue}{\left(\left|d\right|\right)}}^2}\]
      20.8
    5. Applied taylor to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {\left(\left|d\right|\right)}^2} \leadsto \left(\frac{b}{c} + \frac{d \cdot \left(a \cdot {\left(\left|\frac{1}{d}\right|\right)}^2\right)}{{c}^{4}}\right) - \frac{d \cdot a}{{c}^2}\]
      6.3
    6. Taylor expanded around inf to get
      \[\color{red}{\left(\frac{b}{c} + \frac{d \cdot \left(a \cdot {\left(\left|\frac{1}{d}\right|\right)}^2\right)}{{c}^{4}}\right) - \frac{d \cdot a}{{c}^2}} \leadsto \color{blue}{\left(\frac{b}{c} + \frac{d \cdot \left(a \cdot {\left(\left|\frac{1}{d}\right|\right)}^2\right)}{{c}^{4}}\right) - \frac{d \cdot a}{{c}^2}}\]
      6.3
    7. Applied taylor to get
      \[\left(\frac{b}{c} + \frac{d \cdot \left(a \cdot {\left(\left|\frac{1}{d}\right|\right)}^2\right)}{{c}^{4}}\right) - \frac{d \cdot a}{{c}^2} \leadsto \left(\frac{b}{c} + 0\right) - \frac{d \cdot a}{{c}^2}\]
      6.3
    8. Taylor expanded around inf to get
      \[\left(\frac{b}{c} + \color{red}{0}\right) - \frac{d \cdot a}{{c}^2} \leadsto \left(\frac{b}{c} + \color{blue}{0}\right) - \frac{d \cdot a}{{c}^2}\]
      6.3
    9. Applied simplify to get
      \[\left(\frac{b}{c} + 0\right) - \frac{d \cdot a}{{c}^2} \leadsto \frac{b}{c} - \frac{d}{c} \cdot \frac{a}{c}\]
      0.3

    10. Applied final simplification

    if -2.668639f+09 < c < -4.7155537f-14 or 4.2462024f-16 < c < 3.5788512f+20

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      8.3
    2. Using strategy rm
      8.3
    3. Applied add-sqr-sqrt to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + \color{red}{{d}^2}} \leadsto \frac{b \cdot c - a \cdot d}{{c}^2 + \color{blue}{{\left(\sqrt{{d}^2}\right)}^2}}\]
      8.3
    4. Applied simplify to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {\color{red}{\left(\sqrt{{d}^2}\right)}}^2} \leadsto \frac{b \cdot c - a \cdot d}{{c}^2 + {\color{blue}{\left(\left|d\right|\right)}}^2}\]
      5.7
    5. Using strategy rm
      5.7
    6. Applied add-cube-cbrt to get
      \[\color{red}{\frac{b \cdot c - a \cdot d}{{c}^2 + {\left(\left|d\right|\right)}^2}} \leadsto \color{blue}{{\left(\sqrt[3]{\frac{b \cdot c - a \cdot d}{{c}^2 + {\left(\left|d\right|\right)}^2}}\right)}^3}\]
      6.1

    if -4.7155537f-14 < c < 4.2462024f-16

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      11.0
    2. Using strategy rm
      11.0
    3. Applied add-sqr-sqrt to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + \color{red}{{d}^2}} \leadsto \frac{b \cdot c - a \cdot d}{{c}^2 + \color{blue}{{\left(\sqrt{{d}^2}\right)}^2}}\]
      10.9
    4. Applied simplify to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {\color{red}{\left(\sqrt{{d}^2}\right)}}^2} \leadsto \frac{b \cdot c - a \cdot d}{{c}^2 + {\color{blue}{\left(\left|d\right|\right)}}^2}\]
      7.0
    5. Applied taylor to get
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {\left(\left|d\right|\right)}^2} \leadsto \frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \frac{d \cdot a}{{\left(\left|d\right|\right)}^2}\]
      6.1
    6. Taylor expanded around 0 to get
      \[\color{red}{\frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \frac{d \cdot a}{{\left(\left|d\right|\right)}^2}} \leadsto \color{blue}{\frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \frac{d \cdot a}{{\left(\left|d\right|\right)}^2}}\]
      6.1
    7. Applied taylor to get
      \[\frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \frac{d \cdot a}{{\left(\left|d\right|\right)}^2} \leadsto \frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \frac{d \cdot a}{{\left(\left|d\right|\right)}^2}\]
      6.1
    8. Taylor expanded around 0 to get
      \[\frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \color{red}{\frac{d \cdot a}{{\left(\left|d\right|\right)}^2}} \leadsto \frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \color{blue}{\frac{d \cdot a}{{\left(\left|d\right|\right)}^2}}\]
      6.1
    9. Applied simplify to get
      \[\frac{b \cdot c}{{\left(\left|d\right|\right)}^2} - \frac{d \cdot a}{{\left(\left|d\right|\right)}^2} \leadsto \frac{b}{\left|d\right|} \cdot \frac{c}{\left|d\right|} - \frac{a}{\left|d\right|} \cdot \frac{d}{\left|d\right|}\]
      0

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