- Split input into 4 regimes
if b < -3.9035910367662003e+56
Initial program 36.5
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification36.5
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
Taylor expanded around -inf 5.4
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified5.4
\[\leadsto \color{blue}{\frac{-b}{a}}\]
if -3.9035910367662003e+56 < b < -3.9974034204694203e-305
Initial program 10.1
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification10.1
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
- Using strategy
rm Applied add-sqr-sqrt10.4
\[\leadsto \frac{\color{blue}{\sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}}{2 \cdot a}\]
if -3.9974034204694203e-305 < b < 2.14338207405497e+85
Initial program 31.7
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification31.7
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--31.8
\[\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/36.6
\[\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)}}\]
Simplified21.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-out21.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-neg21.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)}}\]
Simplified9.2
\[\leadsto -\color{blue}{\frac{4 \cdot \frac{c}{\frac{2}{1}}}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}}\]
if 2.14338207405497e+85 < b
Initial program 57.5
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification57.6
\[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--57.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/57.8
\[\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)}}\]
Simplified32.1
\[\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-out32.1
\[\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-neg32.1
\[\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)}}\]
Simplified29.4
\[\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 7.2
\[\leadsto -\frac{4 \cdot \frac{c}{\frac{2}{1}}}{\color{blue}{2 \cdot b - 2 \cdot \frac{a \cdot c}{b}}}\]
- Recombined 4 regimes into one program.
Final simplification8.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -3.9035910367662003 \cdot 10^{+56}:\\
\;\;\;\;\frac{-b}{a}\\
\mathbf{elif}\;b \le -3.9974034204694203 \cdot 10^{-305}:\\
\;\;\;\;\frac{\sqrt{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c} - b} \cdot \sqrt{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c} - b}}{a \cdot 2}\\
\mathbf{elif}\;b \le 2.14338207405497 \cdot 10^{+85}:\\
\;\;\;\;\frac{\frac{c}{2} \cdot \left(-4\right)}{b + \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{2} \cdot \left(-4\right)}{b \cdot 2 - 2 \cdot \frac{c \cdot a}{b}}\\
\end{array}\]