- Split input into 2 regimes
if b < 1.0085062546771645e+74
Initial program 14.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}\]
Simplified14.5
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}\\
\end{array}}\]
- Using strategy
rm Applied add-sqr-sqrt14.6
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \color{blue}{\sqrt{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}}}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
if 1.0085062546771645e+74 < b
Initial program 40.8
\[\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}\]
Simplified40.7
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}\\
\end{array}}\]
Taylor expanded around inf 11.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
Simplified4.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\color{blue}{\left(\frac{c}{b} \cdot a - b\right) \cdot 2}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
- Using strategy
rm Applied add-exp-log4.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(\frac{c}{b} \cdot a - b\right) \cdot 2}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \color{blue}{\frac{c}{e^{\log \left(\sqrt{(\left(-4 \cdot a\right) \cdot c + \left(b \cdot b\right))_*} - b\right)}}}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification12.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le 1.0085062546771645 \cdot 10^{+74}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*}}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{\left(\frac{c}{b} \cdot a - b\right) \cdot 2}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{c}{e^{\log \left(\sqrt{(\left(a \cdot -4\right) \cdot c + \left(b \cdot b\right))_*} - b\right)}}\\
\end{array}\]