- Split input into 4 regimes
if b < -2.101293750180749e+143
Initial program 61.9
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied sub-neg61.9
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}}{2 \cdot a}\]
- Using strategy
rm Applied *-un-lft-identity61.9
\[\leadsto \frac{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}\right)}}{2 \cdot a}\]
Applied times-frac61.9
\[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}{a}}\]
Simplified61.9
\[\leadsto \color{blue}{\frac{1}{2}} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}{a}\]
Simplified61.9
\[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\left(-b\right) - \sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}{a}}\]
Taylor expanded around -inf 14.6
\[\leadsto \frac{1}{2} \cdot \frac{\color{blue}{-2 \cdot \frac{a \cdot c}{b}}}{a}\]
if -2.101293750180749e+143 < b < -1.6881136136793343e-90
Initial program 43.4
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--43.5
\[\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/45.8
\[\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)}}\]
Simplified17.1
\[\leadsto \frac{\color{blue}{\left(c \cdot 4\right) \cdot a}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}\]
if -1.6881136136793343e-90 < b < 3.02491424793758e+47
Initial program 13.7
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied sub-neg13.7
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}}{2 \cdot a}\]
- Using strategy
rm Applied *-un-lft-identity13.7
\[\leadsto \frac{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}\right)}}{2 \cdot a}\]
Applied times-frac13.7
\[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}{a}}\]
Simplified13.7
\[\leadsto \color{blue}{\frac{1}{2}} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}{a}\]
Simplified13.6
\[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\left(-b\right) - \sqrt{\left(-4 \cdot a\right) \cdot c + b \cdot b}}{a}}\]
if 3.02491424793758e+47 < b
Initial program 36.1
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied sub-neg36.1
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(-4 \cdot \left(a \cdot c\right)\right)}}}{2 \cdot a}\]
Taylor expanded around inf 6.0
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified6.0
\[\leadsto \color{blue}{\frac{-b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification12.9
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.101293750180749 \cdot 10^{+143}:\\
\;\;\;\;\frac{-2 \cdot \frac{a \cdot c}{b}}{a} \cdot \frac{1}{2}\\
\mathbf{elif}\;b \le -1.6881136136793343 \cdot 10^{-90}:\\
\;\;\;\;\frac{\left(4 \cdot c\right) \cdot a}{\left(\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} + \left(-b\right)\right) \cdot \left(a \cdot 2\right)}\\
\mathbf{elif}\;b \le 3.02491424793758 \cdot 10^{+47}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{c \cdot \left(a \cdot -4\right) + b \cdot b}}{a}\\
\mathbf{else}:\\
\;\;\;\;-\frac{b}{a}\\
\end{array}\]