- Split input into 2 regimes
if b < 3.156993598427036e-12
Initial program 22.3
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Initial simplification22.3
\[\leadsto \frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\]
Taylor expanded around inf 22.3
\[\leadsto \frac{\sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}} - b}{2 \cdot a}\]
Simplified22.3
\[\leadsto \frac{\sqrt{\color{blue}{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}} - b}{2 \cdot a}\]
if 3.156993598427036e-12 < b
Initial program 55.0
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Initial simplification55.0
\[\leadsto \frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\]
Taylor expanded around inf 55.0
\[\leadsto \frac{\sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}} - b}{2 \cdot a}\]
Simplified55.0
\[\leadsto \frac{\sqrt{\color{blue}{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}} - b}{2 \cdot a}\]
- Using strategy
rm Applied flip--55.1
\[\leadsto \frac{\color{blue}{\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} \cdot \sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b \cdot b}{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} + b}}}{2 \cdot a}\]
Applied associate-/l/55.9
\[\leadsto \color{blue}{\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} \cdot \sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} + b\right)}}\]
Simplified26.3
\[\leadsto \frac{\color{blue}{\left(a \cdot -4\right) \cdot c}}{\left(2 \cdot a\right) \cdot \left(\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} + b\right)}\]
- Recombined 2 regimes into one program.
Final simplification23.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 3.156993598427036 \cdot 10^{-12}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(a \cdot -4\right) \cdot c}{\left(b + \sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}\right) \cdot \left(a \cdot 2\right)}\\
\end{array}\]