- Split input into 3 regimes
if b < -1.3395204081552134e+154
Initial program 37.8
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification37.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]
Taylor expanded around -inf 7.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}\\
\end{array}\]
if -1.3395204081552134e+154 < b < 7.3745316499047915e+84
Initial program 9.2
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification9.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt9.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\color{blue}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]
Applied sqrt-prod9.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\sqrt{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}} \cdot \sqrt{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]
if 7.3745316499047915e+84 < b
Initial program 42.6
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification42.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]
Taylor expanded around inf 11.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]
- Recombined 3 regimes into one program.
Final simplification9.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.3395204081552134 \cdot 10^{+154}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}\\
\end{array}\\
\mathbf{elif}\;b \le 7.3745316499047915 \cdot 10^{+84}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}} \cdot \sqrt{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \left(b - 2 \cdot \frac{a \cdot c}{b}\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}\\
\end{array}\]