- Split input into 4 regimes
if b < -2.4179539573507906e+153
Initial program 60.6
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification60.6
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
Taylor expanded around -inf 2.2
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified2.2
\[\leadsto \color{blue}{\frac{-b}{a}}\]
if -2.4179539573507906e+153 < b < -2.689070205918387e-289
Initial program 8.0
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification7.9
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
if -2.689070205918387e-289 < b < 6.269164629607323e+152
Initial program 33.4
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification33.4
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--33.5
\[\leadsto \frac{\color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}}{2 \cdot a}\]
Applied associate-/l/37.4
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}}\]
Simplified19.9
\[\leadsto \frac{\color{blue}{\left(-c\right) \cdot \left(4 \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}\]
- Using strategy
rm Applied distribute-lft-neg-out19.9
\[\leadsto \frac{\color{blue}{-c \cdot \left(4 \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}\]
Applied distribute-frac-neg19.9
\[\leadsto \color{blue}{-\frac{c \cdot \left(4 \cdot a\right)}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}}\]
Simplified8.5
\[\leadsto -\color{blue}{\frac{4 \cdot \frac{c}{\frac{2}{1}}}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}}\]
if 6.269164629607323e+152 < b
Initial program 62.7
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification62.7
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--62.7
\[\leadsto \frac{\color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}}{2 \cdot a}\]
Applied associate-/l/62.7
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}}\]
Simplified37.2
\[\leadsto \frac{\color{blue}{\left(-c\right) \cdot \left(4 \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}\]
- Using strategy
rm Applied distribute-lft-neg-out37.2
\[\leadsto \frac{\color{blue}{-c \cdot \left(4 \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}\]
Applied distribute-frac-neg37.2
\[\leadsto \color{blue}{-\frac{c \cdot \left(4 \cdot a\right)}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}}\]
Simplified36.9
\[\leadsto -\color{blue}{\frac{4 \cdot \frac{c}{\frac{2}{1}}}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}}\]
Taylor expanded around inf 6.8
\[\leadsto -\frac{4 \cdot \frac{c}{\frac{2}{1}}}{\color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)} + b}\]
- Recombined 4 regimes into one program.
Final simplification7.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.4179539573507906 \cdot 10^{+153}:\\
\;\;\;\;-\frac{b}{a}\\
\mathbf{elif}\;b \le -2.689070205918387 \cdot 10^{-289}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c} - b}{2 \cdot a}\\
\mathbf{elif}\;b \le 6.269164629607323 \cdot 10^{+152}:\\
\;\;\;\;\frac{\left(-4\right) \cdot \frac{c}{2}}{b + \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-4\right) \cdot \frac{c}{2}}{b + \left(b - 2 \cdot \frac{c \cdot a}{b}\right)}\\
\end{array}\]