- Split input into 4 regimes
if b < -1.4055221591264778e+38
Initial program 35.1
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified35.1
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}}\]
Taylor expanded around -inf 6.1
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
if -1.4055221591264778e+38 < b < -3.20265155105361e-300
Initial program 9.8
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified9.8
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}}\]
- Using strategy
rm Applied clear-num9.9
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}}\]
if -3.20265155105361e-300 < b < 1.037046466479732e+146
Initial program 33.4
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified33.4
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}}\]
- Using strategy
rm Applied clear-num33.5
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}}\]
- Using strategy
rm Applied flip--33.6
\[\leadsto \frac{1}{\frac{2 \cdot a}{\color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}}}\]
Applied associate-/r/33.6
\[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b} \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}}\]
Applied *-un-lft-identity33.6
\[\leadsto \frac{\color{blue}{1 \cdot 1}}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b} \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}\]
Applied times-frac33.6
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}} \cdot \frac{1}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}\]
Simplified14.6
\[\leadsto \color{blue}{\frac{0 - \left(4 \cdot a\right) \cdot c}{\frac{a}{\frac{1}{2}}}} \cdot \frac{1}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}\]
Taylor expanded around inf 8.5
\[\leadsto \color{blue}{\left(-2 \cdot c\right)} \cdot \frac{1}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}\]
- Using strategy
rm Applied un-div-inv8.3
\[\leadsto \color{blue}{\frac{-2 \cdot c}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}\]
if 1.037046466479732e+146 < b
Initial program 62.1
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified62.1
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}}\]
- Using strategy
rm Applied clear-num62.1
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}}\]
- Using strategy
rm Applied flip--62.2
\[\leadsto \frac{1}{\frac{2 \cdot a}{\color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}}}\]
Applied associate-/r/62.2
\[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b} \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}}\]
Applied *-un-lft-identity62.2
\[\leadsto \frac{\color{blue}{1 \cdot 1}}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b} \cdot \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b\right)}\]
Applied times-frac62.2
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b \cdot b}} \cdot \frac{1}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}}\]
Simplified36.5
\[\leadsto \color{blue}{\frac{0 - \left(4 \cdot a\right) \cdot c}{\frac{a}{\frac{1}{2}}}} \cdot \frac{1}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}\]
Taylor expanded around inf 36.3
\[\leadsto \color{blue}{\left(-2 \cdot c\right)} \cdot \frac{1}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}\]
Taylor expanded around inf 7.2
\[\leadsto \left(-2 \cdot c\right) \cdot \frac{1}{\color{blue}{2 \cdot b - 2 \cdot \frac{a \cdot c}{b}}}\]
Simplified1.8
\[\leadsto \left(-2 \cdot c\right) \cdot \frac{1}{\color{blue}{\left(b - a \cdot \frac{c}{b}\right) \cdot 2}}\]
- Recombined 4 regimes into one program.
Final simplification7.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.4055221591264778 \cdot 10^{+38}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le -3.20265155105361 \cdot 10^{-300}:\\
\;\;\;\;\frac{1}{\frac{a \cdot 2}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}}\\
\mathbf{elif}\;b \le 1.037046466479732 \cdot 10^{+146}:\\
\;\;\;\;\frac{-2 \cdot c}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + b}\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot c\right) \cdot \frac{1}{\left(b - \frac{c}{b} \cdot a\right) \cdot 2}\\
\end{array}\]