- Split input into 3 regimes
if b < -2.7887640869868202e+101
Initial program 45.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 9.4
\[\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{c \cdot a}{b} - b\right)}{2 \cdot a}\\
\end{array}\]
Applied simplify3.3
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b + b}{a + a}\\
\end{array}}\]
- Using strategy
rm Applied flip--3.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} \cdot \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b + b}{a + a}\\
\end{array}\]
Applied associate-/r/3.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{c + c}{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} \cdot \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}\right)}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b + b}{a + a}\\
\end{array}\]
Applied simplify3.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{\frac{2}{1}}{a \cdot 4}} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b + b}{a + a}\\
\end{array}\]
if -2.7887640869868202e+101 < b < 1.984850483081724e+105
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.4
\[\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{\sqrt{-b} \cdot \sqrt{-b} + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Applied fma-def9.4
\[\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(\sqrt{-b}\right) \cdot \left(\sqrt{-b}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right))_*}{2 \cdot a}\\
\end{array}\]
if 1.984850483081724e+105 < b
Initial program 31.1
\[\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.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{c \cdot a}{b}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Applied simplify2.2
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{(\left(\frac{c + c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} + \left(-b\right)}{a + a}\\
\end{array}}\]
- Using strategy
rm Applied *-un-lft-identity2.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\color{blue}{1 \cdot (\left(\frac{c + c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} + \left(-b\right)}{a + a}\\
\end{array}\]
Applied add-cube-cbrt3.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\color{blue}{\left(\sqrt[3]{c + c} \cdot \sqrt[3]{c + c}\right) \cdot \sqrt[3]{c + c}}}{1 \cdot (\left(\frac{c + c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} + \left(-b\right)}{a + a}\\
\end{array}\]
Applied times-frac3.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{\sqrt[3]{c + c} \cdot \sqrt[3]{c + c}}{1} \cdot \frac{\sqrt[3]{c + c}}{(\left(\frac{c + c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} + \left(-b\right)}{a + a}\\
\end{array}\]
Taylor expanded around -inf 3.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\sqrt[3]{c + c} \cdot \sqrt[3]{c + c}}{1} \cdot \frac{\sqrt[3]{c + c}}{(\left(\frac{c + c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{c \cdot a}{b} - b\right) + \left(-b\right)}{a + a}\\
\end{array}\]
Applied simplify2.2
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\frac{c + c}{1}}{(\left(\frac{c}{b} + \frac{c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{(\left(\frac{c}{b}\right) \cdot a + \left(-b\right))_* + (\left(\frac{c}{b}\right) \cdot a + \left(-b\right))_*}{a + a}\\
\end{array}}\]
- Recombined 3 regimes into one program.
Applied simplify6.8
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \le -2.7887640869868202 \cdot 10^{+101}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\left(\left(-b\right) + \sqrt{b \cdot b - a \cdot \left(c \cdot 4\right)}\right) \cdot \frac{\frac{2}{1}}{a \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b + b}{a + a}\\
\end{array}\\
\mathbf{if}\;b \le 1.984850483081724 \cdot 10^{+105}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{(\left(\sqrt{-b}\right) \cdot \left(\sqrt{-b}\right) + \left(\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c}\right))_*}{a + a}\\
\end{array}\\
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\frac{c + c}{1}}{(\left(\frac{c}{b} + \frac{c}{b}\right) \cdot a + \left(\left(-b\right) - b\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{(\left(\frac{c}{b}\right) \cdot a + \left(-b\right))_* + (\left(\frac{c}{b}\right) \cdot a + \left(-b\right))_*}{a + a}\\
\end{array}}\]