- Split input into 4 regimes
if b < -2.6100097810064202e+95
Initial program 45.2
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Taylor expanded around -inf 4.0
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified4.0
\[\leadsto \color{blue}{\frac{-b}{a}}\]
if -2.6100097810064202e+95 < b < -1.8693079465846072e-171
Initial program 6.2
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
- Using strategy
rm Applied div-inv6.4
\[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \frac{1}{2 \cdot a}}\]
if -1.8693079465846072e-171 < b < 1.2990429039753904e+140
Initial program 30.8
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
- Using strategy
rm Applied flip-+31.1
\[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}{2 \cdot a}\]
Applied associate-/l/36.0
\[\leadsto \color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}\]
Simplified20.4
\[\leadsto \frac{\color{blue}{c \cdot \left(a \cdot 4\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}\]
- Using strategy
rm Applied associate-/r*14.7
\[\leadsto \color{blue}{\frac{\frac{c \cdot \left(a \cdot 4\right)}{2 \cdot a}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\]
- Using strategy
rm Applied times-frac9.5
\[\leadsto \frac{\color{blue}{\frac{c}{2} \cdot \frac{a \cdot 4}{a}}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\]
Simplified9.5
\[\leadsto \frac{\frac{c}{2} \cdot \color{blue}{4}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\]
if 1.2990429039753904e+140 < b
Initial program 61.4
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
- Using strategy
rm Applied flip-+61.4
\[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}}{2 \cdot a}\]
Applied associate-/l/61.4
\[\leadsto \color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}}\]
Simplified37.5
\[\leadsto \frac{\color{blue}{c \cdot \left(a \cdot 4\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}\]
- Using strategy
rm Applied associate-/r*37.2
\[\leadsto \color{blue}{\frac{\frac{c \cdot \left(a \cdot 4\right)}{2 \cdot a}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\]
- Using strategy
rm Applied times-frac36.9
\[\leadsto \frac{\color{blue}{\frac{c}{2} \cdot \frac{a \cdot 4}{a}}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\]
Simplified36.9
\[\leadsto \frac{\frac{c}{2} \cdot \color{blue}{4}}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\]
Taylor expanded around inf 7.3
\[\leadsto \frac{\frac{c}{2} \cdot 4}{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{c \cdot a}{b}\right)}}\]
- Recombined 4 regimes into one program.
Final simplification7.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.6100097810064202 \cdot 10^{+95}:\\
\;\;\;\;-\frac{b}{a}\\
\mathbf{elif}\;b \le -1.8693079465846072 \cdot 10^{-171}:\\
\;\;\;\;\left(\left(-b\right) + \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\right) \cdot \frac{1}{a \cdot 2}\\
\mathbf{elif}\;b \le 1.2990429039753904 \cdot 10^{+140}:\\
\;\;\;\;\frac{\frac{c}{2} \cdot 4}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{2} \cdot 4}{\left(-b\right) - \left(b - \frac{c \cdot a}{b} \cdot 2\right)}\\
\end{array}\]