- Split input into 3 regimes
if b < -1.3588834441138985e+154
Initial program 60.9
\[\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 simplification60.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 11.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{2 \cdot a}\\
\end{array}\]
if -1.3588834441138985e+154 < b < 8.321168663371558e+130
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}\]
Initial simplification8.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt8.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\left(\sqrt[3]{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}} \cdot \sqrt[3]{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\right) \cdot \sqrt[3]{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
if 8.321168663371558e+130 < b
Initial program 34.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}\]
Initial simplification34.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 7.0
\[\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(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied *-un-lft-identity7.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{1 \cdot \left(2 \cdot \frac{a \cdot c}{b} - 2 \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Applied times-frac6.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{2}{1} \cdot \frac{c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Simplified6.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{2} \cdot \frac{c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Simplified2.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;2 \cdot \color{blue}{\frac{\frac{c}{2}}{c \cdot \frac{a}{b} - b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied flip--2.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;2 \cdot \frac{\frac{c}{2}}{c \cdot \frac{a}{b} - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} \cdot \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b \cdot b}{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} + b}}{2 \cdot a}\\
\end{array}\]
- Recombined 3 regimes into one program.
Final simplification7.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.3588834441138985 \cdot 10^{+154}:\\
\;\;\;\;\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{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \le 8.321168663371558 \cdot 10^{+130}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \left(\sqrt[3]{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}} \cdot \sqrt[3]{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}\right) \cdot \sqrt[3]{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;2 \cdot \frac{\frac{c}{2}}{c \cdot \frac{a}{b} - b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} \cdot \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} - b \cdot b}{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} + b}}{a \cdot 2}\\
\end{array}\]