- Split input into 4 regimes
if b < -2.1768727311127252e+107
Initial program 58.6
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around -inf 2.7
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified2.7
\[\leadsto \color{blue}{-\frac{c}{b}}\]
if -2.1768727311127252e+107 < b < -6.153174168225342e-205
Initial program 35.9
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--36.0
\[\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/39.7
\[\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)}}\]
Simplified20.1
\[\leadsto \frac{\color{blue}{\left(a \cdot c\right) \cdot 4}}{\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 times-frac15.4
\[\leadsto \color{blue}{\frac{a \cdot c}{2 \cdot a} \cdot \frac{4}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\]
Simplified7.5
\[\leadsto \color{blue}{\left(\frac{1}{2} \cdot c\right)} \cdot \frac{4}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\]
Simplified7.6
\[\leadsto \left(\frac{1}{2} \cdot c\right) \cdot \color{blue}{\frac{4}{\sqrt{c \cdot \left(-4 \cdot a\right) + b \cdot b} - b}}\]
if -6.153174168225342e-205 < b < 3.6278827792750776e+76
Initial program 10.7
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around inf 10.7
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
Simplified10.7
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b - a \cdot \left(4 \cdot c\right)}}}{2 \cdot a}\]
if 3.6278827792750776e+76 < b
Initial program 40.4
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--60.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/61.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)}}\]
Simplified61.4
\[\leadsto \frac{\color{blue}{\left(a \cdot c\right) \cdot 4}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}\]
Taylor expanded around 0 4.9
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified4.9
\[\leadsto \color{blue}{-\frac{b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification7.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.1768727311127252 \cdot 10^{+107}:\\
\;\;\;\;-\frac{c}{b}\\
\mathbf{elif}\;b \le -6.153174168225342 \cdot 10^{-205}:\\
\;\;\;\;\frac{4}{\sqrt{c \cdot \left(-4 \cdot a\right) + b \cdot b} - b} \cdot \left(\frac{1}{2} \cdot c\right)\\
\mathbf{elif}\;b \le 3.6278827792750776 \cdot 10^{+76}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-\frac{b}{a}\\
\end{array}\]