- Split input into 2 regimes
if b < 2.1003665298441633e+80
Initial program 16.6
\[\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 simplification16.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around inf 16.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{{b}^{2} - 4 \cdot \left(a \cdot c\right)} - b}{2 \cdot a}\\
\end{array}\]
Simplified16.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
if 2.1003665298441633e+80 < b
Initial program 28.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}\]
Initial simplification28.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
Taylor expanded around 0 3.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied div-inv3.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b\right) \cdot \frac{1}{2 \cdot a}\\
\end{array}\]
- Using strategy
rm Applied add-cube-cbrt3.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\left(\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b\right) \cdot \left(\left(\sqrt[3]{\frac{1}{2 \cdot a}} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\right) \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\right)}\\
\end{array}\]
Applied associate-*r*3.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b\right) \cdot \left(\sqrt[3]{\frac{1}{2 \cdot a}} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\right)\right) \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\\
\end{array}\]
Simplified3.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\left(\left(\sqrt{(-4 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} - b\right) \cdot \left(\sqrt[3]{\frac{1}{2 \cdot a}} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\right)\right) \cdot \sqrt[3]{\frac{\frac{1}{2}}{a}}}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification13.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 2.1003665298441633 \cdot 10^{+80}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(-4 \cdot \left(a \cdot c\right) + \left(b \cdot b\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}{2 \cdot a}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{(-4 \cdot \left(a \cdot c\right) + \left(b \cdot b\right))_*} - b\right) \cdot \left(\sqrt[3]{\frac{1}{2 \cdot a}} \cdot \sqrt[3]{\frac{1}{2 \cdot a}}\right)\right) \cdot \sqrt[3]{\frac{\frac{1}{2}}{a}}\\
\end{array}\]