- Split input into 4 regimes
if b < -1.5896964098726769e+44
Initial program 55.8
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification55.8
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around -inf 3.9
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified3.9
\[\leadsto \color{blue}{\frac{-c}{b}}\]
if -1.5896964098726769e+44 < b < -4.0932931157804415e-120
Initial program 37.1
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification37.1
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied div-inv37.2
\[\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--37.2
\[\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 frac-times40.8
\[\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 1}{\left(\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\right) \cdot \left(2 \cdot a\right)}}\]
Simplified19.8
\[\leadsto \frac{\color{blue}{\left(a \cdot c\right) \cdot 4}}{\left(\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\right) \cdot \left(2 \cdot a\right)}\]
Simplified19.8
\[\leadsto \frac{\left(a \cdot c\right) \cdot 4}{\color{blue}{\left(2 \cdot a\right) \cdot \left(\sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b} - b\right)}}\]
if -4.0932931157804415e-120 < b < 5.147430478402213e+125
Initial program 11.3
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification11.3
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around 0 11.3
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
if 5.147430478402213e+125 < b
Initial program 50.7
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification50.7
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied div-inv50.7
\[\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 2.3
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification9.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.5896964098726769 \cdot 10^{+44}:\\
\;\;\;\;\frac{-c}{b}\\
\mathbf{elif}\;b \le -4.0932931157804415 \cdot 10^{-120}:\\
\;\;\;\;\frac{\left(a \cdot c\right) \cdot 4}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b + \left(-4 \cdot a\right) \cdot c} - b\right)}\\
\mathbf{elif}\;b \le 5.147430478402213 \cdot 10^{+125}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{{b}^{2} - \left(a \cdot c\right) \cdot 4}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\]