- Split input into 3 regimes
if b < -2.623284355737863e+149
Initial program 59.0
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 59.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Simplified59.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_* \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 11.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_* \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}{2 \cdot a}\\
\end{array}\]
Simplified2.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_* \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_* \cdot 2}{2 \cdot a}\\
\end{array}\]
if -2.623284355737863e+149 < b < 8.321168663371558e+130
Initial program 8.4
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Initial simplification8.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(\left(-4\right) \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(-4\right) \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
if 8.321168663371558e+130 < b
Initial program 34.1
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 7.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
Simplified2.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_* \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied associate-/r*2.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\color{blue}{\frac{\frac{2 \cdot c}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_*}}{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt2.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\frac{2 \cdot c}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_*}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied expm1-log1p-u2.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\frac{2 \cdot c}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_*}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{(e^{\log_* (1 + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c})} - 1)^*} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\
\end{array}\]
- Recombined 3 regimes into one program.
Final simplification6.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.623284355737863 \cdot 10^{+149}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot (c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_*}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot (c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_*}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \le 8.321168663371558 \cdot 10^{+130}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(\left(-4\right) \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(-4\right) \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{\frac{2 \cdot c}{(c \cdot \left(\frac{a}{b}\right) + \left(-b\right))_*}}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{\sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c}} \cdot \sqrt{(e^{\log_* (1 + \sqrt{b \cdot b - \left(a \cdot 4\right) \cdot c})} - 1)^*}}{a \cdot 2}\\
\end{array}\]