- Split input into 3 regimes
if b < -1.9226835678529536e+89
Initial program 42.9
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified42.9
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
Taylor expanded around -inf 3.4
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
if -1.9226835678529536e+89 < b < 4.788197275480391e-88
Initial program 12.4
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified12.4
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
- Using strategy
rm Applied add-sqr-sqrt12.8
\[\leadsto \frac{\color{blue}{\sqrt{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b} \cdot \sqrt{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}}{2 \cdot a}\]
Applied times-frac12.8
\[\leadsto \color{blue}{\frac{\sqrt{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}{2} \cdot \frac{\sqrt{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}{a}}\]
if 4.788197275480391e-88 < b
Initial program 52.3
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified52.3
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
Taylor expanded around inf 9.4
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified9.4
\[\leadsto \color{blue}{-\frac{c}{b}}\]
- Recombined 3 regimes into one program.
Final simplification9.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.9226835678529536 \cdot 10^{+89}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le 4.788197275480391 \cdot 10^{-88}:\\
\;\;\;\;\frac{\sqrt{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}{2} \cdot \frac{\sqrt{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}{a}\\
\mathbf{else}:\\
\;\;\;\;-\frac{c}{b}\\
\end{array}\]