- Split input into 4 regimes
if b < -6.15694868972315489e153
Initial program 38.4
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Taylor expanded around inf 38.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Taylor expanded around 0 38.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{1 \cdot \frac{c}{b} - 1 \cdot \frac{b}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Simplified38.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
- Using strategy
rm Applied associate-/l*38.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{c}}\\
\end{array}\]
Taylor expanded around -inf 1.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{c}{b}\\
\end{array}\]
if -6.15694868972315489e153 < b < -2.76276230647133e-311
Initial program 8.1
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Taylor expanded around inf 8.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt8.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{\left(\sqrt[3]{\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}} \cdot \sqrt[3]{\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}}\right) \cdot \sqrt[3]{\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
if -2.76276230647133e-311 < b < 1.3032715722902576e80
Initial program 8.9
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Taylor expanded around -inf 8.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\
\end{array}\]
if 1.3032715722902576e80 < b
Initial program 42.4
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Taylor expanded around inf 10.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Taylor expanded around 0 4.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{1 \cdot \frac{c}{b} - 1 \cdot \frac{b}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Simplified4.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
- Using strategy
rm Applied flip-+4.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{2 \cdot c}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}\\
\end{array}\]
Simplified4.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\
\end{array}\]
- Recombined 4 regimes into one program.
Final simplification6.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -6.15694868972315489 \cdot 10^{153}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{c}{b}\\
\end{array}\\
\mathbf{elif}\;b \le -2.76276230647133 \cdot 10^{-311}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\left(\sqrt[3]{\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}} \cdot \sqrt[3]{\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}}\right) \cdot \sqrt[3]{\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\\
\mathbf{elif}\;b \le 1.3032715722902576 \cdot 10^{80}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\frac{0 + 4 \cdot \left(a \cdot c\right)}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\
\end{array}\]