- 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 < -5.135572330583252e-131
Initial program 39.1
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied flip--39.2
\[\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.1
\[\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(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 -5.135572330583252e-131 < 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 clear-num12.1
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}\]
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 -5.135572330583252 \cdot 10^{-131}:\\
\;\;\;\;\frac{a \cdot \left(4 \cdot c\right)}{\left(a \cdot 2\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}\\
\mathbf{elif}\;b \le 2.170378666312612 \cdot 10^{+50}:\\
\;\;\;\;\frac{1}{\frac{a \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{b}{a}\\
\end{array}\]