- Split input into 4 regimes
if b < -1.0086797704978404e+164
Initial program 62.9
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around -inf 1.0
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
Simplified1.0
\[\leadsto \color{blue}{-\frac{c}{b}}\]
if -1.0086797704978404e+164 < b < -7.561492702273163e-267
Initial program 36.0
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied clear-num36.1
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}\]
- Using strategy
rm Applied flip--36.1
\[\leadsto \frac{1}{\frac{2 \cdot a}{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}}\]
Applied associate-/r/36.2
\[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot a}{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}}\]
Applied add-cube-cbrt36.2
\[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{2 \cdot a}{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}\]
Applied times-frac36.2
\[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{2 \cdot a}{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}} \cdot \frac{\sqrt[3]{1}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\]
Simplified15.1
\[\leadsto \color{blue}{\left(\frac{\frac{1}{2}}{a} \cdot \left(0 + a \cdot \left(4 \cdot c\right)\right)\right)} \cdot \frac{\sqrt[3]{1}}{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}\]
Simplified15.1
\[\leadsto \left(\frac{\frac{1}{2}}{a} \cdot \left(0 + a \cdot \left(4 \cdot c\right)\right)\right) \cdot \color{blue}{\frac{1}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}}\]
Taylor expanded around -inf 8.6
\[\leadsto \color{blue}{\left(2 \cdot c\right)} \cdot \frac{1}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}\]
if -7.561492702273163e-267 < b < 6.033828240489858e+86
Initial program 9.2
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
- Using strategy
rm Applied clear-num9.4
\[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}\]
- Using strategy
rm Applied *-un-lft-identity9.4
\[\leadsto \frac{1}{\frac{2 \cdot a}{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}}}\]
Applied times-frac9.3
\[\leadsto \frac{1}{\color{blue}{\frac{2}{1} \cdot \frac{a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}\]
Applied add-sqr-sqrt9.3
\[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{\frac{2}{1} \cdot \frac{a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\]
Applied times-frac9.3
\[\leadsto \color{blue}{\frac{\sqrt{1}}{\frac{2}{1}} \cdot \frac{\sqrt{1}}{\frac{a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}}\]
Simplified9.3
\[\leadsto \color{blue}{\frac{1}{2}} \cdot \frac{\sqrt{1}}{\frac{a}{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}}\]
Simplified9.1
\[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\left(-b\right) - \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}{a}}\]
if 6.033828240489858e+86 < b
Initial program 41.0
\[\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Taylor expanded around 0 41.0
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{{b}^{2} - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
Simplified41.0
\[\leadsto \frac{\left(-b\right) - \sqrt{\color{blue}{b \cdot b + \left(c \cdot -4\right) \cdot a}}}{2 \cdot a}\]
Taylor expanded around inf 4.1
\[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}}\]
- Recombined 4 regimes into one program.
Final simplification6.7
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.0086797704978404 \cdot 10^{+164}:\\
\;\;\;\;-\frac{c}{b}\\
\mathbf{elif}\;b \le -7.561492702273163 \cdot 10^{-267}:\\
\;\;\;\;\frac{1}{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b} \cdot \left(2 \cdot c\right)\\
\mathbf{elif}\;b \le 6.033828240489858 \cdot 10^{+86}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - a \cdot \left(4 \cdot c\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}\]