- Split input into 2 regimes
if b < 0.0010949011511441071
Initial program 20.2
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified20.2
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
- Using strategy
rm Applied flip3--20.3
\[\leadsto \frac{\color{blue}{\frac{{\left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4}\right)}^{3} - {b}^{3}}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + \left(b \cdot b + \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot b\right)}}}{2 \cdot a}\]
Applied associate-/l/20.4
\[\leadsto \color{blue}{\frac{{\left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4}\right)}^{3} - {b}^{3}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + \left(b \cdot b + \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot b\right)\right)}}\]
Simplified19.6
\[\leadsto \frac{\color{blue}{\left(b \cdot b - \left(c \cdot a\right) \cdot 4\right) \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot \left(b \cdot b\right)}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + \left(b \cdot b + \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot b\right)\right)}\]
if 0.0010949011511441071 < b
Initial program 46.1
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified46.1
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
Taylor expanded around inf 10.3
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified10.3
\[\leadsto \color{blue}{-\frac{c}{b}}\]
- Recombined 2 regimes into one program.
Final simplification11.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 0.0010949011511441071:\\
\;\;\;\;\frac{\left(b \cdot b - 4 \cdot \left(c \cdot a\right)\right) \cdot \sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)} - \left(b \cdot b\right) \cdot b}{\left(2 \cdot a\right) \cdot \left(\left(b \cdot b + b \cdot \sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)}\right) + \sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;-\frac{c}{b}\\
\end{array}\]