- Split input into 3 regimes
if b < -3.5692996466264766e+148
Initial program 58.3
\[\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 simplification58.3
\[\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{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 58.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied associate-/l*58.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\frac{a}{\frac{b}{c}}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-exp-log58.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c}\right)} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 7.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-\log \left(\frac{-1}{b}\right)} - b}{2 \cdot a}\\
\end{array}\]
Simplified2.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\end{array}\]
if -3.5692996466264766e+148 < b < 4.4193134745531346e+135
Initial program 8.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}\]
Initial simplification8.5
\[\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{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt8.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
Applied sqrt-prod8.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c}} \cdot \sqrt{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
if 4.4193134745531346e+135 < b
Initial program 34.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}\]
Initial simplification34.8
\[\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{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 5.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied associate-/l*1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\frac{a}{\frac{b}{c}}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-exp-log1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c}\right)} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{\left(\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c} \cdot \sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}\right) \cdot \sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right)} - b}{2 \cdot a}\\
\end{array}\]
Applied sqrt-prod1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c} \cdot \sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}} \cdot \sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right)} - b}{2 \cdot a}\\
\end{array}\]
Applied log-prod1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c} \cdot \sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right) + \log \left(\sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right)} - b}{2 \cdot a}\\
\end{array}\]
Applied exp-sum1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c} \cdot \sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right)} \cdot e^{\log \left(\sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right)} - b}{2 \cdot a}\\
\end{array}\]
Simplified1.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left|\sqrt[3]{b \cdot b + a \cdot \left(-4 \cdot c\right)}\right| \cdot e^{\log \left(\sqrt{\sqrt[3]{b \cdot b + \left(-4 \cdot a\right) \cdot c}}\right)} - b}{2 \cdot a}\\
\end{array}\]
- Recombined 3 regimes into one program.
Final simplification6.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -3.5692996466264766 \cdot 10^{+148}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \le 4.4193134745531346 \cdot 10^{+135}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\sqrt{c \cdot \left(a \cdot -4\right) + b \cdot b}} \cdot \sqrt{\sqrt{c \cdot \left(a \cdot -4\right) + b \cdot b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right) + b \cdot b} - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a}{\frac{b}{c}} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\sqrt{\sqrt[3]{c \cdot \left(a \cdot -4\right) + b \cdot b}}\right)} \cdot \left|\sqrt[3]{b \cdot b + \left(-4 \cdot c\right) \cdot a}\right| - b}{a \cdot 2}\\
\end{array}\]