- Split input into 4 regimes
if b < -1.7038881888823536e+149
Initial program 62.2
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification62.2
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around -inf 13.9
\[\leadsto \frac{\color{blue}{-2 \cdot \frac{a \cdot c}{b}}}{2 \cdot a}\]
if -1.7038881888823536e+149 < b < -4.719612806782717e-281
Initial program 34.4
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification34.4
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--34.6
\[\leadsto \frac{\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)}}}}{2 \cdot a}\]
Applied associate-/l/38.3
\[\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(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\right)}}\]
Simplified19.1
\[\leadsto \frac{\color{blue}{4 \cdot \left(a \cdot c\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\right)}\]
- Using strategy
rm Applied associate-/r*13.9
\[\leadsto \color{blue}{\frac{\frac{4 \cdot \left(a \cdot c\right)}{2 \cdot a}}{\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}}\]
Simplified13.9
\[\leadsto \frac{\frac{4 \cdot \left(a \cdot c\right)}{2 \cdot a}}{\color{blue}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}}\]
- Using strategy
rm Applied times-frac13.8
\[\leadsto \frac{\color{blue}{\frac{4}{2} \cdot \frac{a \cdot c}{a}}}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}\]
Simplified13.8
\[\leadsto \frac{\color{blue}{2} \cdot \frac{a \cdot c}{a}}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}\]
Simplified7.8
\[\leadsto \frac{2 \cdot \color{blue}{c}}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}\]
if -4.719612806782717e-281 < b < 4.546772616322934e+41
Initial program 10.5
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification10.5
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
if 4.546772616322934e+41 < b
Initial program 34.0
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Initial simplification34.0
\[\leadsto \frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--59.8
\[\leadsto \frac{\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)}}}}{2 \cdot a}\]
Applied associate-/l/60.5
\[\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(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\right)}}\]
Simplified60.7
\[\leadsto \frac{\color{blue}{4 \cdot \left(a \cdot c\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\right)}\]
- Using strategy
rm Applied associate-/r*59.9
\[\leadsto \color{blue}{\frac{\frac{4 \cdot \left(a \cdot c\right)}{2 \cdot a}}{\left(-b\right) + \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}}\]
Simplified60.0
\[\leadsto \frac{\frac{4 \cdot \left(a \cdot c\right)}{2 \cdot a}}{\color{blue}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}}\]
- Using strategy
rm Applied times-frac60.0
\[\leadsto \frac{\color{blue}{\frac{4}{2} \cdot \frac{a \cdot c}{a}}}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}\]
Simplified60.0
\[\leadsto \frac{\color{blue}{2} \cdot \frac{a \cdot c}{a}}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}\]
Simplified59.9
\[\leadsto \frac{2 \cdot \color{blue}{c}}{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}\]
Taylor expanded around 0 5.6
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified5.6
\[\leadsto \color{blue}{\frac{-b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification9.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.7038881888823536 \cdot 10^{+149}:\\
\;\;\;\;\frac{-2 \cdot \frac{a \cdot c}{b}}{a \cdot 2}\\
\mathbf{elif}\;b \le -4.719612806782717 \cdot 10^{-281}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{\left(-4 \cdot c\right) \cdot a + b \cdot b} - b}\\
\mathbf{elif}\;b \le 4.546772616322934 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\
\end{array}\]