- Split input into 4 regimes
if b < -2.116092086722358e+92
Initial program 57.6
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around -inf 14.6
\[\leadsto \frac{\color{blue}{-2 \cdot \frac{a \cdot c}{b}}}{2 \cdot a}\]
if -2.116092086722358e+92 < b < -1.1138846873684963e-130
Initial program 39.2
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--39.3
\[\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/42.2
\[\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)}}\]
Simplified18.2
\[\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)}\]
if -1.1138846873684963e-130 < b < 2.170378666312612e+50
Initial program 12.0
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied *-un-lft-identity12.0
\[\leadsto \frac{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}}{2 \cdot a}\]
Applied times-frac12.0
\[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}}\]
if 2.170378666312612e+50 < b
Initial program 35.4
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around inf 6.3
\[\leadsto \color{blue}{-1 \cdot \frac{b}{a}}\]
Simplified6.3
\[\leadsto \color{blue}{\frac{-b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification12.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.116092086722358 \cdot 10^{+92}:\\
\;\;\;\;\frac{-2 \cdot \frac{a \cdot c}{b}}{a \cdot 2}\\
\mathbf{elif}\;b \le -1.1138846873684963 \cdot 10^{-130}:\\
\;\;\;\;\frac{4 \cdot \left(a \cdot c\right)}{\left(a \cdot 2\right) \cdot \left(\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} + \left(-b\right)\right)}\\
\mathbf{elif}\;b \le 2.170378666312612 \cdot 10^{+50}:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a} \cdot \frac{1}{2}\\
\mathbf{else}:\\
\;\;\;\;-\frac{b}{a}\\
\end{array}\]