Initial program 30.1
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.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}\]
Taylor expanded around inf 30.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{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}\]
Simplified30.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \left(c \cdot \frac{a}{b}\right) - \left(b + b\right)}}{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}\]
Taylor expanded around -inf 7.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \frac{a}{b}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right) + \left(2 \cdot \frac{a \cdot c}{b} - b\right)}}\\
\end{array}\]
Simplified3.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \frac{a}{b}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}}\\
\end{array}\]
- Using strategy
rm Applied *-un-lft-identity3.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \frac{a}{\color{blue}{1 \cdot b}}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
Applied add-cube-cbrt3.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \frac{\color{blue}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}}{1 \cdot b}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
Applied times-frac3.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \color{blue}{\left(\frac{\sqrt[3]{a} \cdot \sqrt[3]{a}}{1} \cdot \frac{\sqrt[3]{a}}{b}\right)}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
Applied associate-*r*3.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \color{blue}{\left(\left(c \cdot \frac{\sqrt[3]{a} \cdot \sqrt[3]{a}}{1}\right) \cdot \frac{\sqrt[3]{a}}{b}\right)} - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
Simplified3.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(\color{blue}{\left(c \cdot \left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)\right)} \cdot \frac{\sqrt[3]{a}}{b}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
Initial program 43.8
\[\begin{array}{l}
\mathbf{if}\;b \ge 0.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}\]
Taylor expanded around inf 10.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{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}\]
Simplified4.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \left(c \cdot \frac{a}{b}\right) - \left(b + b\right)}}{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}\]
Taylor expanded around -inf 4.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \frac{a}{b}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right) + \left(2 \cdot \frac{a \cdot c}{b} - b\right)}}\\
\end{array}\]
Simplified4.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\frac{2 \cdot \left(c \cdot \frac{a}{b}\right) - \left(b + b\right)}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}}\\
\end{array}\]
Taylor expanded around 0 4.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{1 \cdot \frac{c}{b} - 1 \cdot \frac{b}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
Simplified4.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;\color{blue}{1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}\\
\end{array}\]
- Using strategy
rm Applied add-sqr-sqrt4.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{2 \cdot c}{\sqrt{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)} \cdot \sqrt{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}}}\\
\end{array}\]
Applied times-frac4.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sqrt{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}} \cdot \frac{c}{\sqrt{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}}\\
\end{array}\]
Simplified4.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sqrt{\left(-b\right) + \left(2 \cdot \left(c \cdot \frac{a}{b}\right) - b\right)}} \cdot \frac{c}{\sqrt{\left(-b\right) + \left(c \cdot \left(\frac{a}{b} \cdot 2\right) - b\right)}}\\
\end{array}\]
Simplified4.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0.0:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{2}{\sqrt{\left(-b\right) + \left(2 \cdot \left(c \cdot \frac{a}{b}\right) - b\right)}} \cdot \frac{c}{\sqrt{\left(-b\right) + \left(2 \cdot \left(c \cdot \frac{a}{b}\right) - b\right)}}}\\
\end{array}\]