- Split input into 3 regimes
if b < -5.7184540639932095e+20
Initial program 32.8
\[\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}\]
Taylor expanded around -inf 11.9
\[\leadsto \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) + \left(2 \cdot \frac{c \cdot a}{b} - b\right)}{2 \cdot a}\\
\end{array}\]
Applied simplify7.1
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{b}}{1} - \frac{b + b}{a \cdot 2}\\
\end{array}}\]
- Using strategy
rm Applied add-cube-cbrt7.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\left(\sqrt[3]{\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}} \cdot \sqrt[3]{\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}\right) \cdot \sqrt[3]{\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{b}}{1} - \frac{b + b}{a \cdot 2}\\
\end{array}\]
if -5.7184540639932095e+20 < b < 9.60294828328832e+82
Initial program 9.5
\[\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}\]
- Using strategy
rm Applied add-exp-log10.9
\[\leadsto \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) + e^{\log \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied pow110.9
\[\leadsto \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) + e^{\log \left({\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{1}\right)}}{2 \cdot a}\\
\end{array}\]
Applied log-pow10.9
\[\leadsto \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) + e^{1 \cdot \log \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}{2 \cdot a}\\
\end{array}\]
Applied exp-prod11.0
\[\leadsto \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) + {\left(e^{1}\right)}^{\left(\log \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)\right)}}{2 \cdot a}\\
\end{array}\]
Applied simplify11.0
\[\leadsto \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) + {e}^{\left(\log \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)\right)}}{2 \cdot a}\\
\end{array}\]
if 9.60294828328832e+82 < b
Initial program 28.1
\[\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}\]
Taylor expanded around inf 6.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{c \cdot a}{b}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Applied simplify2.6
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(2 \cdot a\right) \cdot \frac{c}{b} - \left(b + b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}{2 \cdot a}\\
\end{array}}\]
- Recombined 3 regimes into one program.
Applied simplify7.9
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \le -5.7184540639932095 \cdot 10^{+20}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\left(\sqrt[3]{\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}} \cdot \sqrt[3]{\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}\right) \cdot \sqrt[3]{\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b + b}{a \cdot 2}\\
\end{array}\\
\mathbf{if}\;b \le 9.60294828328832 \cdot 10^{+82}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + {e}^{\left(\log \left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)\right)}}{a \cdot 2}\\
\end{array}\\
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c \cdot 2}{\frac{c}{b} \cdot \left(a \cdot 2\right) - \left(b + b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)} - b}{a \cdot 2}\\
\end{array}}\]