- Split input into 4 regimes
if b < -1.3338600865169524e+85
Initial program 42.2
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Initial simplification42.2
\[\leadsto \frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}\]
Taylor expanded around -inf 3.9
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified3.9
\[\leadsto \color{blue}{\frac{-b}{a}}\]
if -1.3338600865169524e+85 < b < -1.3407597897048622e-276
Initial program 9.3
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Initial simplification9.3
\[\leadsto \frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}\]
- Using strategy
rm Applied div-inv9.4
\[\leadsto \color{blue}{\left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b\right) \cdot \frac{1}{2 \cdot a}}\]
if -1.3407597897048622e-276 < b < 4.5801122062859315e+86
Initial program 31.3
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Initial simplification31.3
\[\leadsto \frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--31.4
\[\leadsto \frac{\color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot b}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}}}{2 \cdot a}\]
Applied associate-/l/36.1
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}}\]
Simplified22.0
\[\leadsto \frac{\color{blue}{\left(-4\right) \cdot \left(c \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}\]
- Using strategy
rm Applied distribute-lft-neg-out22.0
\[\leadsto \frac{\color{blue}{-4 \cdot \left(c \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}\]
Applied distribute-frac-neg22.0
\[\leadsto \color{blue}{-\frac{4 \cdot \left(c \cdot a\right)}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}}\]
Simplified10.1
\[\leadsto -\color{blue}{\frac{c \cdot \frac{4}{\frac{2}{1}}}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}\]
if 4.5801122062859315e+86 < b
Initial program 58.1
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Initial simplification58.1
\[\leadsto \frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--58.1
\[\leadsto \frac{\color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot b}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}}}{2 \cdot a}\]
Applied associate-/l/58.4
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}}\]
Simplified31.0
\[\leadsto \frac{\color{blue}{\left(-4\right) \cdot \left(c \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}\]
- Using strategy
rm Applied distribute-lft-neg-out31.0
\[\leadsto \frac{\color{blue}{-4 \cdot \left(c \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}\]
Applied distribute-frac-neg31.0
\[\leadsto \color{blue}{-\frac{4 \cdot \left(c \cdot a\right)}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}}\]
Simplified28.2
\[\leadsto -\color{blue}{\frac{c \cdot \frac{4}{\frac{2}{1}}}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}\]
Taylor expanded around inf 7.7
\[\leadsto -\frac{c \cdot \frac{4}{\frac{2}{1}}}{\color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)} + b}\]
- Recombined 4 regimes into one program.
Final simplification8.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.3338600865169524 \cdot 10^{+85}:\\
\;\;\;\;-\frac{b}{a}\\
\mathbf{elif}\;b \le -1.3407597897048622 \cdot 10^{-276}:\\
\;\;\;\;\left(\sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4} - b\right) \cdot \frac{1}{a \cdot 2}\\
\mathbf{elif}\;b \le 4.5801122062859315 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{4}{2} \cdot \left(-c\right)}{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} + b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{4}{2} \cdot \left(-c\right)}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right) + b}\\
\end{array}\]