- Split input into 3 regimes
if b < -1.4724387140230096e-17
Initial program 54.1
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified54.1
\[\leadsto \color{blue}{\frac{\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2}}{a}}\]
Taylor expanded around -inf 6.1
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified6.1
\[\leadsto \color{blue}{-\frac{c}{b}}\]
if -1.4724387140230096e-17 < b < 3.6247124144787303e+143
Initial program 14.6
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified14.5
\[\leadsto \color{blue}{\frac{\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2}}{a}}\]
- Using strategy
rm Applied div-inv14.7
\[\leadsto \color{blue}{\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2} \cdot \frac{1}{a}}\]
- Using strategy
rm Applied pow114.7
\[\leadsto \frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2} \cdot \color{blue}{{\left(\frac{1}{a}\right)}^{1}}\]
Applied pow114.7
\[\leadsto \color{blue}{{\left(\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2}\right)}^{1}} \cdot {\left(\frac{1}{a}\right)}^{1}\]
Applied pow-prod-down14.7
\[\leadsto \color{blue}{{\left(\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2} \cdot \frac{1}{a}\right)}^{1}}\]
Simplified14.5
\[\leadsto {\color{blue}{\left(\frac{b + \sqrt{(a \cdot \left(c \cdot -4\right) + \left(b \cdot b\right))_*}}{a} \cdot \frac{-1}{2}\right)}}^{1}\]
if 3.6247124144787303e+143 < b
Initial program 56.8
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified56.8
\[\leadsto \color{blue}{\frac{\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2}}{a}}\]
- Using strategy
rm Applied div-inv56.8
\[\leadsto \color{blue}{\frac{\left(-b\right) - \sqrt{(\left(a \cdot c\right) \cdot -4 + \left(b \cdot b\right))_*}}{2} \cdot \frac{1}{a}}\]
Taylor expanded around inf 1.7
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
- Recombined 3 regimes into one program.
Final simplification10.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.4724387140230096 \cdot 10^{-17}:\\
\;\;\;\;-\frac{c}{b}\\
\mathbf{elif}\;b \le 3.6247124144787303 \cdot 10^{+143}:\\
\;\;\;\;\frac{\sqrt{(a \cdot \left(c \cdot -4\right) + \left(b \cdot b\right))_*} + b}{a} \cdot \frac{-1}{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\]