- Split input into 3 regimes
if b < -2.1523509733424586e+74
Initial program 40.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}\]
Initial simplification40.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around -inf 10.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{2 \cdot a}\\
\end{array}\]
if -2.1523509733424586e+74 < b < 1.6286841579823116e+128
Initial program 9.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 simplification9.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt9.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}} \cdot \sqrt{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}} - b}{2 \cdot a}\\
\end{array}\]
if 1.6286841579823116e+128 < b
Initial program 33.2
\[\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 simplification33.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 7.7
\[\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{\sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a} - b}{2 \cdot a}\\
\end{array}\]
- Recombined 3 regimes into one program.
Final simplification9.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -2.1523509733424586 \cdot 10^{+74}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \le 1.6286841579823116 \cdot 10^{+128}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}} \cdot \sqrt{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}} - b}{a \cdot 2}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a} - b}{a \cdot 2}\\
\end{array}\]