- Split input into 4 regimes
if b < -7.016796193946308e+56
Initial program 36.0
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified36.0
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
Taylor expanded around -inf 5.1
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
if -7.016796193946308e+56 < b < 1.9043057091884097e-112
Initial program 12.2
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified12.2
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
- Using strategy
rm Applied clear-num12.3
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}}\]
- Using strategy
rm Applied associate-/r/12.4
\[\leadsto \color{blue}{\frac{1}{2 \cdot a} \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b\right)}\]
- Using strategy
rm Applied associate-*l/12.2
\[\leadsto \color{blue}{\frac{1 \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b\right)}{2 \cdot a}}\]
Simplified12.3
\[\leadsto \frac{\color{blue}{\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} - b}}{2 \cdot a}\]
if 1.9043057091884097e-112 < b < 1.6472829075515696e+64
Initial program 41.6
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified41.6
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
- Using strategy
rm Applied clear-num41.6
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}}\]
- Using strategy
rm Applied associate-/r/41.6
\[\leadsto \color{blue}{\frac{1}{2 \cdot a} \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b\right)}\]
- Using strategy
rm Applied associate-*l/41.6
\[\leadsto \color{blue}{\frac{1 \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b\right)}{2 \cdot a}}\]
Simplified41.7
\[\leadsto \frac{\color{blue}{\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} - b}}{2 \cdot a}\]
- Using strategy
rm Applied flip--41.8
\[\leadsto \frac{\color{blue}{\frac{\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} \cdot \sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} - b \cdot b}{\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} + b}}}{2 \cdot a}\]
Applied associate-/l/44.9
\[\leadsto \color{blue}{\frac{\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} \cdot \sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} + b\right)}}\]
Simplified20.5
\[\leadsto \frac{\color{blue}{\left(c \cdot -4\right) \cdot a}}{\left(2 \cdot a\right) \cdot \left(\sqrt{\left(c \cdot -4\right) \cdot a + b \cdot b} + b\right)}\]
if 1.6472829075515696e+64 < b
Initial program 58.0
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Simplified58.0
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}}\]
Taylor expanded around inf 3.5
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified3.5
\[\leadsto \color{blue}{-\frac{c}{b}}\]
- Recombined 4 regimes into one program.
Final simplification9.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -7.016796193946308 \cdot 10^{+56}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\mathbf{elif}\;b \le 1.9043057091884097 \cdot 10^{-112}:\\
\;\;\;\;\frac{\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} - b}{a \cdot 2}\\
\mathbf{elif}\;b \le 1.6472829075515696 \cdot 10^{+64}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot c\right)}{\left(\sqrt{a \cdot \left(-4 \cdot c\right) + b \cdot b} + b\right) \cdot \left(a \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;-\frac{c}{b}\\
\end{array}\]