- Split input into 4 regimes
if b < -6.614644252084147e-35 or -1.180471078121508e-156 < b < -4.380258891361565e-166
Initial program 53.3
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around 0 53.3
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
Simplified53.3
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(c \cdot -4\right) \cdot a}}}{2 \cdot a}\]
Taylor expanded around -inf 8.5
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified8.5
\[\leadsto \color{blue}{-\frac{c}{b}}\]
if -6.614644252084147e-35 < b < -1.180471078121508e-156
Initial program 30.2
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--30.3
\[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}{2 \cdot a}\]
Applied associate-/l/33.8
\[\leadsto \color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}}\]
Simplified23.7
\[\leadsto \frac{\color{blue}{\left(a \cdot c\right) \cdot 4}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}\]
if -4.380258891361565e-166 < b < 5.1457556548524475e+64
Initial program 11.9
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around 0 11.9
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
Simplified11.9
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(c \cdot -4\right) \cdot a}}}{2 \cdot a}\]
- Using strategy
rm Applied add-sqr-sqrt11.9
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{\sqrt{b \cdot b + \left(c \cdot -4\right) \cdot a} \cdot \sqrt{b \cdot b + \left(c \cdot -4\right) \cdot a}}}}{2 \cdot a}\]
Applied sqrt-prod12.2
\[\leadsto \frac{\left(-b\right) - \color{blue}{\sqrt{\sqrt{b \cdot b + \left(c \cdot -4\right) \cdot a}} \cdot \sqrt{\sqrt{b \cdot b + \left(c \cdot -4\right) \cdot a}}}}{2 \cdot a}\]
if 5.1457556548524475e+64 < b
Initial program 38.5
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around 0 38.5
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
Simplified38.6
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(c \cdot -4\right) \cdot a}}}{2 \cdot a}\]
Taylor expanded around inf 4.7
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification10.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -6.614644252084147 \cdot 10^{-35}:\\
\;\;\;\;-\frac{c}{b}\\
\mathbf{elif}\;b \le -1.180471078121508 \cdot 10^{-156}:\\
\;\;\;\;\frac{\left(a \cdot c\right) \cdot 4}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} + \left(-b\right)\right)}\\
\mathbf{elif}\;b \le -4.380258891361565 \cdot 10^{-166}:\\
\;\;\;\;-\frac{c}{b}\\
\mathbf{elif}\;b \le 5.1457556548524475 \cdot 10^{+64}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\sqrt{a \cdot \left(c \cdot -4\right) + b \cdot b}} \cdot \sqrt{\sqrt{a \cdot \left(c \cdot -4\right) + b \cdot b}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\]