- Split input into 2 regimes
if b < 5.523479422929744e+47
Initial program 15.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}\]
Initial simplification15.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt15.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2} \cdot c}{\sqrt{\left(\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right) \cdot \sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}} - b}\\
\end{array}\]
Applied sqrt-prod15.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{\sqrt{\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}} - b}\\
\end{array}\]
Applied fma-neg15.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{2 \cdot c}{(\left(\sqrt{\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}}\\
\end{array}\]
Simplified15.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{(\left(\left|\sqrt[3]{(\left(c \cdot -4\right) \cdot a + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}\\
\end{array}\]
if 5.523479422929744e+47 < b
Initial program 36.2
\[\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}\]
Initial simplification36.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
Taylor expanded around 0 6.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification13.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 5.523479422929744 \cdot 10^{+47}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{(\left(\left|\sqrt[3]{(\left(c \cdot -4\right) \cdot a + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]