- Split input into 3 regimes
if b < -1.01384800159969898e70
Initial program 41.2
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified41.2
\[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}{2}}{a}}\]
Taylor expanded around -inf 5.0
\[\leadsto \color{blue}{1 \cdot \frac{c}{b} - 1 \cdot \frac{b}{a}}\]
Simplified5.0
\[\leadsto \color{blue}{1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)}\]
if -1.01384800159969898e70 < b < 9.8276187263360236e-79
Initial program 13.6
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified13.6
\[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}{2}}{a}}\]
- Using strategy
rm Applied *-un-lft-identity13.6
\[\leadsto \frac{\frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}{2}}{\color{blue}{1 \cdot a}}\]
Applied div-inv13.6
\[\leadsto \frac{\color{blue}{\left(\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b\right) \cdot \frac{1}{2}}}{1 \cdot a}\]
Applied times-frac13.7
\[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}{1} \cdot \frac{\frac{1}{2}}{a}}\]
Simplified13.7
\[\leadsto \color{blue}{\left(\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b\right)} \cdot \frac{\frac{1}{2}}{a}\]
if 9.8276187263360236e-79 < b
Initial program 53.1
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Simplified53.1
\[\leadsto \color{blue}{\frac{\frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}{2}}{a}}\]
Taylor expanded around inf 9.4
\[\leadsto \color{blue}{-1 \cdot \frac{c}{b}}\]
- Recombined 3 regimes into one program.
Final simplification10.4
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \le -1.01384800159969898 \cdot 10^{70}:\\
\;\;\;\;1 \cdot \left(\frac{c}{b} - \frac{b}{a}\right)\\
\mathbf{elif}\;b \le 9.8276187263360236 \cdot 10^{-79}:\\
\;\;\;\;\left(\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b\right) \cdot \frac{\frac{1}{2}}{a}\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{c}{b}\\
\end{array}\]