- Split input into 3 regimes
if b < -1.019221836402376e116
Initial program 52.3
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
Taylor expanded around -inf 3.7
\[\leadsto \color{blue}{0.5 \cdot \frac{c}{b} - 0.66666666666666663 \cdot \frac{b}{a}}\]
if -1.019221836402376e116 < b < 5.51314038804235395e-45
Initial program 13.3
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
- Using strategy
rm Applied div-inv13.4
\[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{1}{3 \cdot a}}\]
- Using strategy
rm Applied add-cube-cbrt13.4
\[\leadsto \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{3 \cdot a}\]
Applied times-frac13.5
\[\leadsto \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \color{blue}{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{3} \cdot \frac{\sqrt[3]{1}}{a}\right)}\]
Simplified13.5
\[\leadsto \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(\color{blue}{\frac{1}{3}} \cdot \frac{\sqrt[3]{1}}{a}\right)\]
Simplified13.5
\[\leadsto \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(\frac{1}{3} \cdot \color{blue}{\frac{1}{a}}\right)\]
- Using strategy
rm Applied associate-*l/13.5
\[\leadsto \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \color{blue}{\frac{1 \cdot \frac{1}{a}}{3}}\]
Simplified13.5
\[\leadsto \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{\color{blue}{\frac{1}{a}}}{3}\]
if 5.51314038804235395e-45 < b
Initial program 54.8
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
Taylor expanded around inf 7.3
\[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}}\]
- Recombined 3 regimes into one program.
Final simplification9.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.019221836402376 \cdot 10^{116}:\\
\;\;\;\;0.5 \cdot \frac{c}{b} - 0.66666666666666663 \cdot \frac{b}{a}\\
\mathbf{elif}\;b \le 5.51314038804235395 \cdot 10^{-45}:\\
\;\;\;\;\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{\frac{1}{a}}{3}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\
\end{array}\]