- Split input into 3 regimes
if b < -1.4676243183549563e+66
Initial program 38.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 9.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{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}{2 \cdot a}\\
\end{array}\]
Applied simplify4.6
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b}{a}\\
\end{array}}\]
- Using strategy
rm Applied add-cube-cbrt4.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\left(\sqrt[3]{\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}} \cdot \sqrt[3]{\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}\right) \cdot \sqrt[3]{\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b}{a}\\
\end{array}\]
if -1.4676243183549563e+66 < b < 2.766211155591128e+18
Initial program 8.6
\[\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-sqrt8.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) + \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 sqrt-prod8.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{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
if 2.766211155591128e+18 < b
Initial program 23.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 23.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{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}{2 \cdot a}\\
\end{array}\]
Applied simplify23.0
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b}{a}\\
\end{array}}\]
- Using strategy
rm Applied div-inv23.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\left(c + c\right) \cdot \frac{1}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b}{a}\\
\end{array}\]
Taylor expanded around inf 8.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\left(c + c\right) \cdot \frac{1}{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{c \cdot a}{b}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{c}{b} - \frac{b}{a}\\
\end{array}\]
Applied simplify4.6
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\left(\left(-b\right) - b\right) + \frac{a + a}{\frac{b}{c}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}}\]
- Recombined 3 regimes into one program.
Applied simplify6.7
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \le -1.4676243183549563 \cdot 10^{+66}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\sqrt[3]{\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}} \cdot \left(\sqrt[3]{\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}} \cdot \sqrt[3]{\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\\
\mathbf{if}\;b \le 2.766211155591128 \cdot 10^{+18}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}} \cdot \sqrt{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}} + \left(-b\right)}{a + a}\\
\end{array}\\
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c + c}{\frac{a + a}{\frac{b}{c}} + \left(\left(-b\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}}\]