- Split input into 2 regimes
if b < -3.819497819135284e+153 or 3.41583987548531e+47 < b
Initial program 34.8
\[\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-sqrt34.8
\[\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) + \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
Applied rem-sqrt-square34.8
\[\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|\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right|}{2 \cdot a}\\
\end{array}\]
Simplified34.8
\[\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|\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\
\end{array}\]
Taylor expanded around 0 19.1
\[\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|b\right|}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied associate-/l*19.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{2}{\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{c}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 3.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\
\end{array}\]
Simplified3.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{-c}{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\
\end{array}\]
if -3.819497819135284e+153 < b < 3.41583987548531e+47
Initial program 9.5
\[\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.5
\[\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) + \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
Applied rem-sqrt-square9.5
\[\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|\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right|}{2 \cdot a}\\
\end{array}\]
Simplified9.5
\[\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|\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt9.6
\[\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|\sqrt{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}}\right|}{2 \cdot a}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification7.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -3.819497819135284 \cdot 10^{+153} \lor \neg \left(b \le 3.41583987548531 \cdot 10^{+47}\right):\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left|\sqrt{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}}\right|}{2 \cdot a}\\
\end{array}\]