- Split input into 3 regimes
if b < -1.6043155169605484e+112
Initial program 47.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}\]
Taylor expanded around -inf 9.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{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}{2 \cdot a}\\
\end{array}\]
Applied simplify3.7
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{1}}{b} - \frac{b}{a}\\
\end{array}}\]
- Using strategy
rm Applied add-cube-cbrt3.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}} \cdot \sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}\right) \cdot \sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{1}}{b} - \frac{b}{a}\\
\end{array}\]
Applied times-frac3.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{2}{\sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}} \cdot \sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}} \cdot \frac{c}{\sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{1}}{b} - \frac{b}{a}\\
\end{array}\]
if -1.6043155169605484e+112 < b < 2.9522260100101025e+95
Initial program 8.4
\[\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-sqr-sqrt8.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{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
Applied simplify8.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{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b} \cdot \sqrt{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
Applied simplify8.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{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b} \cdot \sqrt{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b}}{2 \cdot a}\\
\end{array}\]
if 2.9522260100101025e+95 < b
Initial program 30.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.9
\[\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 simplify3.0
\[\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 simplify6.5
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \le -1.6043155169605484 \cdot 10^{+112}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{\sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}} \cdot \frac{2}{\sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\\
\mathbf{if}\;b \le 2.9522260100101025 \cdot 10^{+95}:\\
\;\;\;\;\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{\sqrt{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b} \cdot \sqrt{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}}{a \cdot 2}\\
\end{array}\\
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c \cdot 2}{\left(a \cdot 2\right) \cdot \frac{c}{b} - \left(b + b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}{a \cdot 2}\\
\end{array}}\]