- Split input into 4 regimes
if b < -8.687420785654022e+64
Initial program 56.4
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied div-inv56.4
\[\leadsto \color{blue}{\left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right) \cdot \frac{1}{2 \cdot a}}\]
Taylor expanded around -inf 3.7
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified3.7
\[\leadsto \color{blue}{\frac{-c}{b}}\]
if -8.687420785654022e+64 < b < -1.455494926740124e-121
Initial program 40.8
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied div-inv40.9
\[\leadsto \color{blue}{\left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right) \cdot \frac{1}{2 \cdot a}}\]
- Using strategy
rm Applied flip--41.0
\[\leadsto \color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}} \cdot \frac{1}{2 \cdot a}\]
Applied associate-*l/41.0
\[\leadsto \color{blue}{\frac{\left(\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right) \cdot \frac{1}{2 \cdot a}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\]
Simplified15.2
\[\leadsto \frac{\color{blue}{\frac{\left(a \cdot c\right) \cdot 4}{2 \cdot a}}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\]
if -1.455494926740124e-121 < b < 5.391490838818595e+114
Initial program 11.7
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied add-cube-cbrt12.5
\[\leadsto \frac{\left(-b\right) - \color{blue}{\left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right) \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}{2 \cdot a}\]
Applied add-cube-cbrt12.6
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{-b} \cdot \sqrt[3]{-b}\right) \cdot \sqrt[3]{-b}} - \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right) \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
Applied prod-diff12.7
\[\leadsto \frac{\color{blue}{(\left(\sqrt[3]{-b} \cdot \sqrt[3]{-b}\right) \cdot \left(\sqrt[3]{-b}\right) + \left(-\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right)\right))_* + (\left(-\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right) \cdot \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right) + \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right)\right))_*}}{2 \cdot a}\]
Simplified11.8
\[\leadsto \frac{\color{blue}{\left(\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}\right)} + (\left(-\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right) \cdot \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right) + \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \left(\sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \sqrt[3]{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\right)\right))_*}{2 \cdot a}\]
Simplified11.7
\[\leadsto \frac{\left(\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}\right) + \color{blue}{0}}{2 \cdot a}\]
if 5.391490838818595e+114 < b
Initial program 49.0
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around inf 3.1
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified3.1
\[\leadsto \color{blue}{\frac{-b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification8.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -8.687420785654022 \cdot 10^{+64}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{elif}\;b \le -1.455494926740124 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{\left(a \cdot c\right) \cdot 4}{2 \cdot a}}{\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} + \left(-b\right)}\\
\mathbf{elif}\;b \le 5.391490838818595 \cdot 10^{+114}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(a \cdot 4\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\
\end{array}\]