- Split input into 2 regimes
if b < -5.9697242670823925e-13 or 3.8865772398298144e142 < b
Initial program 31.9
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.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 22.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.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(2 \cdot \frac{a \cdot c}{b} - b\right)}}\\
\end{array}\]
Simplified20.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.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(a \cdot \left(c \cdot \frac{2}{b}\right) - b\right)}}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt20.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.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(-\color{blue}{b}\right) + \left(\left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}\right) \cdot \left(c \cdot \frac{2}{b}\right) - b\right)}\\
\end{array}\]
Applied associate-*l*20.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.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(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \left(\sqrt[3]{a} \cdot \left(c \cdot \frac{2}{b}\right)\right) - b\right)}\\
\end{array}\]
Simplified20.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.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) + \left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \left(c \cdot \left(\frac{2}{b} \cdot \sqrt[3]{a}\right)\right) - b\right)}\\
\end{array}\]
Taylor expanded around inf 7.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \left(c \cdot \left(\frac{2}{b} \cdot \sqrt[3]{a}\right)\right) - b\right)}\\
\end{array}\]
Simplified4.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \left(a \cdot \frac{c}{b}\right)\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \left(c \cdot \left(\frac{2}{b} \cdot \sqrt[3]{a}\right)\right) - b\right)}\\
\end{array}\]
if -5.9697242670823925e-13 < b < 3.8865772398298144e142
Initial program 9.3
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.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}\]
Simplified9.3
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{2}{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}\\
\end{array}}\]
- Recombined 2 regimes into one program.
Final simplification7.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -5.9697242670823925 \cdot 10^{-13} \lor \neg \left(b \le 3.8865772398298144 \cdot 10^{142}\right):\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(2 \cdot \left(a \cdot \frac{c}{b}\right) - b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \left(c \cdot \left(\sqrt[3]{a} \cdot \frac{2}{b}\right)\right) - b\right) - b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;c \cdot \frac{2}{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}\\
\end{array}\]