- Split input into 3 regimes
if b_2 < -1.5081953238138552e+114
Initial program 48.5
\[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
Simplified48.5
\[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}}\]
Taylor expanded around -inf 3.2
\[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}}\]
if -1.5081953238138552e+114 < b_2 < 1.270925720464309e-123
Initial program 10.9
\[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
Simplified10.9
\[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}}\]
- Using strategy
rm Applied clear-num11.1
\[\leadsto \color{blue}{\frac{1}{\frac{a}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}}\]
if 1.270925720464309e-123 < b_2
Initial program 51.5
\[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\]
Simplified51.5
\[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}}\]
Taylor expanded around inf 11.2
\[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b_2}}\]
- Recombined 3 regimes into one program.
Final simplification10.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b_2 \le -1.5081953238138552 \cdot 10^{+114}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - \frac{b_2}{a} \cdot 2\\
\mathbf{elif}\;b_2 \le 1.270925720464309 \cdot 10^{-123}:\\
\;\;\;\;\frac{1}{\frac{a}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}\]