- Split input into 2 regimes
if b < 4.546772616322934e+41
Initial program 15.5
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification15.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
- Using strategy
rm Applied pow1/215.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt15.5
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\color{blue}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\]
Applied sqrt-prod15.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\]
if 4.546772616322934e+41 < b
Initial program 34.1
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification34.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
- Using strategy
rm Applied pow1/234.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\]
Taylor expanded around 0 5.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification13.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 4.546772616322934 \cdot 10^{+41}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{{\left((c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*\right)}^{\frac{1}{2}} - b}\\
\end{array}\]