- Split input into 2 regimes
if b < 6.824076749764882e+60
Initial program 17.2
\[\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}\]
Initial simplification17.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 17.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{{b}^{2} - 4 \cdot \left(a \cdot c\right)} - b}{2 \cdot a}\\
\end{array}\]
Simplified17.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt17.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Applied sqrt-prod17.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt17.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{\color{blue}{\left(\sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}\right) \cdot \sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Applied sqrt-prod17.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\color{blue}{\sqrt{\sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Simplified17.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\color{blue}{\left|\sqrt[3]{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}\right|} \cdot \sqrt{\sqrt[3]{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
if 6.824076749764882e+60 < b
Initial program 26.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}\]
Initial simplification26.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 26.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{{b}^{2} - 4 \cdot \left(a \cdot c\right)} - b}{2 \cdot a}\\
\end{array}\]
Simplified26.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around 0 3.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification13.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 6.824076749764882 \cdot 10^{+60}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\sqrt{\sqrt[3]{(-4 \cdot \left(a \cdot c\right) + \left(b \cdot b\right))_*}} \cdot \left|\sqrt[3]{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}\right|} \cdot \sqrt{\sqrt{(-4 \cdot \left(a \cdot c\right) + \left(b \cdot b\right))_*}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]