\[\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: 14.8 s
Input Error: 25.5
Output Error: 4.6
Log:
Profile: 🕒
\(\begin{cases} \frac{c}{\sqrt{c^2 + d^2}^*} \cdot \frac{b}{\sqrt{c^2 + d^2}^*} - 0 & \text{when } c \le -1.2679504393766895 \cdot 10^{+78} \\ \frac{c \cdot b}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{(\left(\frac{c}{d}\right) * c + d)_*} & \text{when } c \le 1.2361527926053716 \cdot 10^{+158} \\ \frac{c}{\sqrt{c^2 + d^2}^*} \cdot \frac{b}{\sqrt{c^2 + d^2}^*} - 0 & \text{otherwise} \end{cases}\)

    if c < -1.2679504393766895e+78 or 1.2361527926053716e+158 < c

    1. Started with
      \[\frac{b \cdot c - a \cdot d}{{c}^2 + {d}^2}\]
      38.7
    2. Using strategy rm
      38.7
    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}}\]
      38.7
    4. Using strategy rm
      38.7
    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}}}\]
      34.8
    6. Using strategy rm
      34.8
    7. Applied add-sqr-sqrt to get
      \[\frac{b \cdot c}{\color{red}{{c}^2 + {d}^2}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \frac{b \cdot c}{\color{blue}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}}\]
      34.8
    8. Applied add-sqr-sqrt to get
      \[\frac{\color{red}{b \cdot c}}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \frac{\color{blue}{{\left(\sqrt{b \cdot c}\right)}^2}}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2} - \frac{a}{\frac{{c}^2 + {d}^2}{d}}\]
      49.4
    9. Applied square-undiv to get
      \[\color{red}{\frac{{\left(\sqrt{b \cdot c}\right)}^2}{{\left(\sqrt{{c}^2 + {d}^2}\right)}^2}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \color{blue}{{\left(\frac{\sqrt{b \cdot c}}{\sqrt{{c}^2 + {d}^2}}\right)}^2} - \frac{a}{\frac{{c}^2 + {d}^2}{d}}\]
      49.4
    10. Applied simplify to get
      \[{\color{red}{\left(\frac{\sqrt{b \cdot c}}{\sqrt{{c}^2 + {d}^2}}\right)}}^2 - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto {\color{blue}{\left(\frac{\sqrt{c \cdot b}}{\sqrt{c^2 + d^2}^*}\right)}}^2 - \frac{a}{\frac{{c}^2 + {d}^2}{d}}\]
      43.5
    11. Applied taylor to get
      \[{\left(\frac{\sqrt{c \cdot b}}{\sqrt{c^2 + d^2}^*}\right)}^2 - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto {\left(\frac{\sqrt{c \cdot b}}{\sqrt{c^2 + d^2}^*}\right)}^2 - 0\]
      42.7
    12. Taylor expanded around 0 to get
      \[{\left(\frac{\sqrt{c \cdot b}}{\sqrt{c^2 + d^2}^*}\right)}^2 - \color{red}{0} \leadsto {\left(\frac{\sqrt{c \cdot b}}{\sqrt{c^2 + d^2}^*}\right)}^2 - \color{blue}{0}\]
      42.7
    13. Applied simplify to get
      \[{\left(\frac{\sqrt{c \cdot b}}{\sqrt{c^2 + d^2}^*}\right)}^2 - 0 \leadsto \frac{c}{\sqrt{c^2 + d^2}^*} \cdot \frac{b}{\sqrt{c^2 + d^2}^*} - 0\]
      0.0

    14. Applied final simplification

    if -1.2679504393766895e+78 < c < 1.2361527926053716e+158

    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.1
    4. Using strategy rm
      19.1
    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}}}\]
      17.3
    6. Using strategy rm
      17.3
    7. Applied *-un-lft-identity to get
      \[\frac{b \cdot c}{\color{red}{{c}^2 + {d}^2}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \frac{b \cdot c}{\color{blue}{1 \cdot \left({c}^2 + {d}^2\right)}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}}\]
      17.3
    8. Applied times-frac to get
      \[\color{red}{\frac{b \cdot c}{1 \cdot \left({c}^2 + {d}^2\right)}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \color{blue}{\frac{b}{1} \cdot \frac{c}{{c}^2 + {d}^2}} - \frac{a}{\frac{{c}^2 + {d}^2}{d}}\]
      16.2
    9. Applied taylor to get
      \[\frac{b}{1} \cdot \frac{c}{{c}^2 + {d}^2} - \frac{a}{\frac{{c}^2 + {d}^2}{d}} \leadsto \frac{b}{1} \cdot \frac{c}{{c}^2 + {d}^2} - \frac{a}{d + \frac{{c}^2}{d}}\]
      5.6
    10. Taylor expanded around 0 to get
      \[\frac{b}{1} \cdot \frac{c}{{c}^2 + {d}^2} - \frac{a}{\color{red}{d + \frac{{c}^2}{d}}} \leadsto \frac{b}{1} \cdot \frac{c}{{c}^2 + {d}^2} - \frac{a}{\color{blue}{d + \frac{{c}^2}{d}}}\]
      5.6
    11. Applied simplify to get
      \[\frac{b}{1} \cdot \frac{c}{{c}^2 + {d}^2} - \frac{a}{d + \frac{{c}^2}{d}} \leadsto \frac{\frac{b \cdot c}{1}}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{\frac{c}{\frac{d}{c}} + d}\]
      6.8

    12. Applied final simplification
    13. Applied simplify to get
      \[\color{red}{\frac{\frac{b \cdot c}{1}}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{\frac{c}{\frac{d}{c}} + d}} \leadsto \color{blue}{\frac{c \cdot b}{(d * d + \left(c \cdot c\right))_*} - \frac{a}{(\left(\frac{c}{d}\right) * c + d)_*}}\]
      6.8

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