Average Error: 19.5 → 7.0
Time: 1.2m
Precision: 64
\[\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
\[\begin{array}{l} \mathbf{if}\;b \le -4.0920731351700544 \cdot 10^{+86}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \le 3.9623228839445877 \cdot 10^{+90}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{-(\left(\left|\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + b)_*}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right| + \left(-b\right)}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right| + \left(-b\right)}{2 \cdot a}\\ \end{array}\]
double f(double a, double b, double c) {
        double r1867304 = b;
        double r1867305 = 0.0;
        bool r1867306 = r1867304 >= r1867305;
        double r1867307 = 2.0;
        double r1867308 = c;
        double r1867309 = r1867307 * r1867308;
        double r1867310 = -r1867304;
        double r1867311 = r1867304 * r1867304;
        double r1867312 = 4.0;
        double r1867313 = a;
        double r1867314 = r1867312 * r1867313;
        double r1867315 = r1867314 * r1867308;
        double r1867316 = r1867311 - r1867315;
        double r1867317 = sqrt(r1867316);
        double r1867318 = r1867310 - r1867317;
        double r1867319 = r1867309 / r1867318;
        double r1867320 = r1867310 + r1867317;
        double r1867321 = r1867307 * r1867313;
        double r1867322 = r1867320 / r1867321;
        double r1867323 = r1867306 ? r1867319 : r1867322;
        return r1867323;
}

double f(double a, double b, double c) {
        double r1867324 = b;
        double r1867325 = -4.0920731351700544e+86;
        bool r1867326 = r1867324 <= r1867325;
        double r1867327 = 0.0;
        bool r1867328 = r1867324 >= r1867327;
        double r1867329 = 2.0;
        double r1867330 = c;
        double r1867331 = r1867329 * r1867330;
        double r1867332 = -r1867324;
        double r1867333 = -4.0;
        double r1867334 = a;
        double r1867335 = r1867333 * r1867334;
        double r1867336 = r1867324 * r1867324;
        double r1867337 = fma(r1867330, r1867335, r1867336);
        double r1867338 = sqrt(r1867337);
        double r1867339 = r1867332 - r1867338;
        double r1867340 = r1867331 / r1867339;
        double r1867341 = fabs(r1867324);
        double r1867342 = r1867332 + r1867341;
        double r1867343 = r1867329 * r1867334;
        double r1867344 = r1867342 / r1867343;
        double r1867345 = r1867328 ? r1867340 : r1867344;
        double r1867346 = 3.9623228839445877e+90;
        bool r1867347 = r1867324 <= r1867346;
        double r1867348 = cbrt(r1867337);
        double r1867349 = fabs(r1867348);
        double r1867350 = sqrt(r1867348);
        double r1867351 = fma(r1867349, r1867350, r1867324);
        double r1867352 = -r1867351;
        double r1867353 = r1867331 / r1867352;
        double r1867354 = fabs(r1867338);
        double r1867355 = r1867354 + r1867332;
        double r1867356 = r1867355 / r1867343;
        double r1867357 = r1867328 ? r1867353 : r1867356;
        double r1867358 = r1867332 - r1867324;
        double r1867359 = r1867331 / r1867358;
        double r1867360 = r1867328 ? r1867359 : r1867356;
        double r1867361 = r1867347 ? r1867357 : r1867360;
        double r1867362 = r1867326 ? r1867345 : r1867361;
        return r1867362;
}

\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\

\end{array}
\begin{array}{l}
\mathbf{if}\;b \le -4.0920731351700544 \cdot 10^{+86}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\

\end{array}\\

\mathbf{elif}\;b \le 3.9623228839445877 \cdot 10^{+90}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{-(\left(\left|\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + b)_*}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right| + \left(-b\right)}{2 \cdot a}\\

\end{array}\\

\mathbf{elif}\;b \ge 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right| + \left(-b\right)}{2 \cdot a}\\

\end{array}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Split input into 3 regimes
  2. if b < -4.0920731351700544e+86

    1. Initial program 41.4

      \[\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{1 \cdot \left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    4. Applied sqrt-prod41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    5. Applied add-cube-cbrt41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}}\right) - \sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    6. Applied distribute-rgt-neg-in41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(-\sqrt[3]{b}\right)} - \sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    7. Applied prod-diff41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(-\sqrt[3]{b}\right) + \left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_* + (\left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(\sqrt{1}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    8. Simplified41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right)} + (\left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(\sqrt{1}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_*}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    9. Simplified41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + \color{blue}{0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    10. Using strategy rm
    11. Applied add-sqr-sqrt41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\ \end{array}\]
    12. Applied rem-sqrt-square41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right|}{2 \cdot a}\\ \end{array}\]
    13. Simplified41.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    14. Taylor expanded around 0 4.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\ \end{array}\]

    if -4.0920731351700544e+86 < b < 3.9623228839445877e+90

    1. Initial program 9.0

      \[\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{1 \cdot \left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    4. Applied sqrt-prod9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    5. Applied add-cube-cbrt9.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}}\right) - \sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    6. Applied distribute-rgt-neg-in9.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(-\sqrt[3]{b}\right)} - \sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    7. Applied prod-diff9.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(-\sqrt[3]{b}\right) + \left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_* + (\left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(\sqrt{1}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    8. Simplified9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right)} + (\left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(\sqrt{1}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_*}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    9. Simplified9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + \color{blue}{0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    10. Using strategy rm
    11. Applied add-sqr-sqrt9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\ \end{array}\]
    12. Applied rem-sqrt-square9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right|}{2 \cdot a}\\ \end{array}\]
    13. Simplified9.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    14. Using strategy rm
    15. Applied add-cube-cbrt9.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{\color{blue}{\left(\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    16. Applied sqrt-prod9.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \color{blue}{\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    17. Applied add-cube-cbrt9.3

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\color{blue}{\left(\sqrt[3]{-b} \cdot \sqrt[3]{-b}\right) \cdot \sqrt[3]{-b}} - \sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    18. Applied prod-diff9.3

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left((\left(\sqrt[3]{-b} \cdot \sqrt[3]{-b}\right) \cdot \left(\sqrt[3]{-b}\right) + \left(-\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right))_* + (\left(-\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right))_*\right)} + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    19. Simplified9.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\color{blue}{\left(-(\left(\left|\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + b)_*\right)} + (\left(-\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right))_*\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    20. Simplified9.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-(\left(\left|\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + b)_*\right) + \color{blue}{0}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]

    if 3.9623228839445877e+90 < b

    1. Initial program 30.0

      \[\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity30.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{1 \cdot \left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    4. Applied sqrt-prod30.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    5. Applied add-cube-cbrt30.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}}\right) - \sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    6. Applied distribute-rgt-neg-in30.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(-\sqrt[3]{b}\right)} - \sqrt{1} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    7. Applied prod-diff46.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{(\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(-\sqrt[3]{b}\right) + \left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_* + (\left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(\sqrt{1}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    8. Simplified46.5

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right)} + (\left(-\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \left(\sqrt{1}\right) + \left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{1}\right))_*}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    9. Simplified30.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + \color{blue}{0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array}\]
    10. Using strategy rm
    11. Applied add-sqr-sqrt30.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\ \end{array}\]
    12. Applied rem-sqrt-square30.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right|}{2 \cdot a}\\ \end{array}\]
    13. Simplified30.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
    14. Taylor expanded around 0 3.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\left(-b\right) - \color{blue}{b}\right) + 0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}\right|}{2 \cdot a}\\ \end{array}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification7.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \le -4.0920731351700544 \cdot 10^{+86}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left|b\right|}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \le 3.9623228839445877 \cdot 10^{+90}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{-(\left(\left|\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right|\right) \cdot \left(\sqrt{\sqrt[3]{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + b)_*}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right| + \left(-b\right)}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \ge 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}\right| + \left(-b\right)}{2 \cdot a}\\ \end{array}\]

Reproduce

herbie shell --seed 2019101 +o rules:numerics
(FPCore (a b c)
  :name "jeff quadratic root 2"
  (if (>= b 0) (/ (* 2 c) (- (- b) (sqrt (- (* b b) (* (* 4 a) c))))) (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a))))