- Split input into 3 regimes
if b_2 < -1.60745926176150953e-114
Initial program 51.5
\[\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
Taylor expanded around -inf 10.7
\[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b_2}}\]
if -1.60745926176150953e-114 < b_2 < 1.06294858696921844e107
Initial program 10.6
\[\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
- Using strategy
rm Applied add-sqr-sqrt10.6
\[\leadsto \frac{\left(-b_2\right) - \sqrt{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} \cdot \sqrt{b_2 \cdot b_2 - a \cdot c}}}}{a}\]
Applied sqrt-prod10.8
\[\leadsto \frac{\left(-b_2\right) - \color{blue}{\sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}} \cdot \sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}}}}{a}\]
if 1.06294858696921844e107 < b_2
Initial program 46.7
\[\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
Taylor expanded around inf 3.1
\[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}}\]
- Recombined 3 regimes into one program.
Final simplification9.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b_2 \le -1.60745926176150953 \cdot 10^{-114}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 1.06294858696921844 \cdot 10^{107}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}} \cdot \sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c}}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\end{array}\]