- Split input into 3 regimes
if b < -9.449587374738468e+122
Initial program 32.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}\]
Taylor expanded around -inf 6.0
\[\leadsto \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}:\\
\;\;\;\;\color{blue}{\frac{2 \cdot c}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}}\\
\end{array}\]
Applied simplify2.2
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{c \cdot \frac{a}{b} - b}\\
\end{array}}\]
- Using strategy
rm Applied clear-num3.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{c \cdot \frac{a}{b} - b}{c}}\\
\end{array}\]
Applied simplify3.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{1}{\frac{a}{b} - \frac{b}{c}}}\\
\end{array}\]
if -9.449587374738468e+122 < b < 3.1891680473922315e+102
Initial program 8.3
\[\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}\]
- Using strategy
rm Applied add-cube-cbrt8.7
\[\leadsto \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}{\color{blue}{\left(-b\right) + \left(\sqrt[3]{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt[3]{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right) \cdot \sqrt[3]{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}\\
\end{array}\]
if 3.1891680473922315e+102 < b
Initial program 45.7
\[\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}\]
Taylor expanded around inf 10.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}}{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}\]
Applied simplify3.6
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{b} \cdot 1 - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\
\end{array}}\]
- Using strategy
rm Applied add-cbrt-cube3.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{b} \cdot 1 - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{2 \cdot c}{\sqrt[3]{\left(\left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right) \cdot \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right)\right) \cdot \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right)}}}\\
\end{array}\]
Applied add-cbrt-cube3.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{b} \cdot 1 - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{\left(\left(2 \cdot c\right) \cdot \left(2 \cdot c\right)\right) \cdot \left(2 \cdot c\right)}}{\sqrt[3]{\left(\left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right) \cdot \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right)\right) \cdot \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right)}}\\
\end{array}\]
Applied cbrt-undiv3.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{b} \cdot 1 - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{\frac{\left(\left(2 \cdot c\right) \cdot \left(2 \cdot c\right)\right) \cdot \left(2 \cdot c\right)}{\left(\left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right) \cdot \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right)\right) \cdot \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right)}}\\
\end{array}\]
Applied simplify3.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{b} \cdot 1 - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{c \cdot 2}{\sqrt{b \cdot b - a \cdot \left(c \cdot 4\right)} - b}\right)}^{3}}\\
\end{array}\]
- Recombined 3 regimes into one program.
Applied simplify6.7
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \le -9.449587374738468 \cdot 10^{+122}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\
\end{array}\\
\mathbf{if}\;b \le 3.1891680473922315 \cdot 10^{+102}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\left(\sqrt[3]{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\right) \cdot \sqrt[3]{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}} + \left(-b\right)}\\
\end{array}\\
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(\frac{c \cdot 2}{\sqrt{b \cdot b - a \cdot \left(4 \cdot c\right)} - b}\right)}^{3}}\\
\end{array}}\]