- Split input into 3 regimes
if b < -1.0257151524457705e+154
Initial program 60.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 10.4
\[\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 simplify1.3
\[\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}}\]
if -1.0257151524457705e+154 < b < 3.930866939110186e-294 or 5.060792172872335e+134 < b
Initial program 19.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}\]
Taylor expanded around inf 9.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{c \cdot a}{b} - 2 \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Applied simplify7.5
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{c \cdot \frac{a}{b} - 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-cube-cbrt7.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{\color{blue}{\left(\sqrt[3]{c \cdot \frac{a}{b}} \cdot \sqrt[3]{c \cdot \frac{a}{b}}\right) \cdot \sqrt[3]{c \cdot \frac{a}{b}}} - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around 0 24.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{\left(\sqrt[3]{c \cdot \frac{a}{b}} \cdot \sqrt[3]{c \cdot \frac{a}{b}}\right) \cdot \color{blue}{e^{\frac{1}{3} \cdot \left(\left(\log a + \log c\right) - \log b\right)}} - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\\
\end{array}\]
Applied simplify7.5
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{\left(\sqrt[3]{a \cdot \frac{c}{b}} \cdot \sqrt[3]{a \cdot \frac{c}{b}}\right) \cdot \sqrt[3]{a \cdot \frac{c}{b}} - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c} - b}{2 \cdot a}\\
\end{array}}\]
if 3.930866939110186e-294 < b < 5.060792172872335e+134
Initial program 7.7
\[\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 7.7
\[\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 simplify7.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}}\]
- Recombined 3 regimes into one program.
Applied simplify6.9
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \le -1.0257151524457705 \cdot 10^{+154} \lor \neg \left(b \le 3.930866939110186 \cdot 10^{-294} \lor \neg \left(b \le 5.060792172872335 \cdot 10^{+134}\right)\right):\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\\
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{c}{\left(\sqrt[3]{\frac{c}{b} \cdot a} \cdot \sqrt[3]{\frac{c}{b} \cdot a}\right) \cdot \sqrt[3]{\frac{c}{b} \cdot a} - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{a \cdot 2}\\
\end{array}}\]