- Split input into 3 regimes
if b < -2.7211479368677152e+157
Initial program 61.0
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 11.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left(2 \cdot \frac{a \cdot c}{b} - b\right)}{2 \cdot a}\\
\end{array}\]
if -2.7211479368677152e+157 < b < 4.571282738610312e+100
Initial program 9.3
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt9.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Applied sqrt-prod9.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
if 4.571282738610312e+100 < b
Initial program 29.4
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 6.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
- Recombined 3 regimes into one program.
Final simplification8.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.7211479368677152 \cdot 10^{+157}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) + \left(-b\right)}{2 \cdot a}\\
\end{array}\\
\mathbf{elif}\;b \le 4.571282738610312 \cdot 10^{+100}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}{2 \cdot a}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \left(b - 2 \cdot \frac{a \cdot c}{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}{2 \cdot a}\\
\end{array}\]