- Split input into 4 regimes
if b < -2.4179539573507906e+153
Initial program 60.6
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Taylor expanded around -inf 2.2
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified2.2
\[\leadsto \color{blue}{\frac{-b}{a}}\]
if -2.4179539573507906e+153 < b < -2.689070205918387e-289
Initial program 7.9
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
if -2.689070205918387e-289 < b < 6.269164629607323e+152
Initial program 33.4
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
- Using strategy
rm Applied flip-+33.5
\[\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/37.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)}}\]
Simplified20.0
\[\leadsto \frac{\color{blue}{4 \cdot \left(c \cdot a\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 times-frac16.4
\[\leadsto \color{blue}{\frac{4}{2 \cdot a} \cdot \frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\]
- Using strategy
rm Applied pow116.4
\[\leadsto \frac{4}{2 \cdot a} \cdot \color{blue}{{\left(\frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)}^{1}}\]
Applied pow116.4
\[\leadsto \color{blue}{{\left(\frac{4}{2 \cdot a}\right)}^{1}} \cdot {\left(\frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)}^{1}\]
Applied pow-prod-down16.4
\[\leadsto \color{blue}{{\left(\frac{4}{2 \cdot a} \cdot \frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)}^{1}}\]
Simplified8.5
\[\leadsto {\color{blue}{\left(\frac{\frac{c \cdot 4}{\frac{2}{1}}}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\right)}}^{1}\]
if 6.269164629607323e+152 < b
Initial program 62.7
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
- Using strategy
rm Applied flip-+62.7
\[\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/62.7
\[\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.2
\[\leadsto \frac{\color{blue}{4 \cdot \left(c \cdot a\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 times-frac37.0
\[\leadsto \color{blue}{\frac{4}{2 \cdot a} \cdot \frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\]
- Using strategy
rm Applied pow137.0
\[\leadsto \frac{4}{2 \cdot a} \cdot \color{blue}{{\left(\frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)}^{1}}\]
Applied pow137.0
\[\leadsto \color{blue}{{\left(\frac{4}{2 \cdot a}\right)}^{1}} \cdot {\left(\frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)}^{1}\]
Applied pow-prod-down37.0
\[\leadsto \color{blue}{{\left(\frac{4}{2 \cdot a} \cdot \frac{c \cdot a}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)}^{1}}\]
Simplified36.9
\[\leadsto {\color{blue}{\left(\frac{\frac{c \cdot 4}{\frac{2}{1}}}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\right)}}^{1}\]
Taylor expanded around inf 6.8
\[\leadsto {\left(\frac{\frac{c \cdot 4}{\frac{2}{1}}}{\left(-b\right) - \color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)}}\right)}^{1}\]
- Recombined 4 regimes into one program.
Final simplification7.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.4179539573507906 \cdot 10^{+153}:\\
\;\;\;\;-\frac{b}{a}\\
\mathbf{elif}\;b \le -2.689070205918387 \cdot 10^{-289}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c} + \left(-b\right)}{2 \cdot a}\\
\mathbf{elif}\;b \le 6.269164629607323 \cdot 10^{+152}:\\
\;\;\;\;\frac{\frac{c \cdot 4}{2}}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c \cdot 4}{2}}{\left(-b\right) - \left(b - 2 \cdot \frac{c \cdot a}{b}\right)}\\
\end{array}\]