- Split input into 2 regimes
if b < 1.3071943870403567e+75
Initial program 15.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}\]
Initial simplification15.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt15.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\color{blue}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} \cdot \sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
Applied sqrt-prod15.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\sqrt{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}} \cdot \sqrt{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt15.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\sqrt{\color{blue}{\left(\sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b} \cdot \sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b}\right) \cdot \sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}} \cdot \sqrt{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
Applied sqrt-prod15.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\color{blue}{\sqrt{\sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b} \cdot \sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b}} \cdot \sqrt{\sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}} \cdot \sqrt{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
Simplified15.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\color{blue}{\left|\sqrt[3]{b \cdot b + \left(c \cdot a\right) \cdot -4}\right|} \cdot \sqrt{\sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b}}} \cdot \sqrt{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt15.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\left|\color{blue}{\sqrt{\sqrt[3]{b \cdot b + \left(c \cdot a\right) \cdot -4}} \cdot \sqrt{\sqrt[3]{b \cdot b + \left(c \cdot a\right) \cdot -4}}}\right| \cdot \sqrt{\sqrt[3]{\left(-4 \cdot a\right) \cdot c + b \cdot b}}} \cdot \sqrt{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
if 1.3071943870403567e+75 < b
Initial program 39.9
\[\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 simplification39.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
Taylor expanded around 0 4.8
\[\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{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification13.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 1.3071943870403567 \cdot 10^{+75}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\sqrt{b \cdot b + \left(a \cdot -4\right) \cdot c}} \cdot \sqrt{\left|\sqrt{\sqrt[3]{b \cdot b + \left(c \cdot a\right) \cdot -4}} \cdot \sqrt{\sqrt[3]{b \cdot b + \left(c \cdot a\right) \cdot -4}}\right| \cdot \sqrt{\sqrt[3]{b \cdot b + \left(a \cdot -4\right) \cdot c}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b + \left(a \cdot -4\right) \cdot c} - b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b + \left(a \cdot -4\right) \cdot c} - b}\\
\end{array}\]