- Split input into 2 regimes
if (if (>= b 0) (/ (- (- b) (sqrt (fma (* 4 a) (- c) (* b b)))) (* 2 a)) (/ (* 2 c) (- b b))) < -4.2578024127431834e+287 or 2.4350214317344988e+256 < (if (>= b 0) (/ (- (- b) (sqrt (fma (* 4 a) (- c) (* b b)))) (* 2 a)) (/ (* 2 c) (- b b)))
Initial program 25.9
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification25.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
Taylor expanded around inf 18.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
Simplified17.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\color{blue}{(\left(\frac{a}{b}\right) \cdot c + \left(-b\right))_* \cdot 2}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
if -4.2578024127431834e+287 < (if (>= b 0) (/ (- (- b) (sqrt (fma (* 4 a) (- c) (* b b)))) (* 2 a)) (/ (* 2 c) (- b b))) < 2.4350214317344988e+256
Initial program 3.0
\[\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\
\end{array}\]
Initial simplification3.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]
Taylor expanded around 0 3.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\color{blue}{2 \cdot c}}{b - b}\\
\end{array}\]
- Recombined 2 regimes into one program.
Final simplification12.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{b - b}\\
\end{array} \le -4.2578024127431834 \cdot 10^{+287}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{(\left(\frac{a}{b}\right) \cdot c + \left(-b\right))_* \cdot 2}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\\
\mathbf{elif}\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{b - b}\\
\end{array} \le 2.4350214317344988 \cdot 10^{+256}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*}}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{b - b}\\
\end{array}\\
\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{(\left(\frac{a}{b}\right) \cdot c + \left(-b\right))_* \cdot 2}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\sqrt{(\left(4 \cdot a\right) \cdot \left(-c\right) + \left(b \cdot b\right))_*} - b}\\
\end{array}\]