\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\begin{array}{l}
\mathbf{if}\;b \le -3.23769359395589062 \cdot 10^{66}:\\
\;\;\;\;\frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}{3 \cdot a}\\
\mathbf{elif}\;b \le -2.87410222399403687 \cdot 10^{-279}:\\
\;\;\;\;\frac{\sqrt{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}} \cdot \sqrt{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a}\\
\mathbf{elif}\;b \le 2445759453.4737968:\\
\;\;\;\;\frac{1}{1 \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b}\\
\end{array}double f(double a, double b, double c) {
double r171485 = b;
double r171486 = -r171485;
double r171487 = r171485 * r171485;
double r171488 = 3.0;
double r171489 = a;
double r171490 = r171488 * r171489;
double r171491 = c;
double r171492 = r171490 * r171491;
double r171493 = r171487 - r171492;
double r171494 = sqrt(r171493);
double r171495 = r171486 + r171494;
double r171496 = r171495 / r171490;
return r171496;
}
double f(double a, double b, double c) {
double r171497 = b;
double r171498 = -3.2376935939558906e+66;
bool r171499 = r171497 <= r171498;
double r171500 = -r171497;
double r171501 = 1.5;
double r171502 = a;
double r171503 = c;
double r171504 = r171502 * r171503;
double r171505 = r171504 / r171497;
double r171506 = r171501 * r171505;
double r171507 = r171506 - r171497;
double r171508 = r171500 + r171507;
double r171509 = 3.0;
double r171510 = r171509 * r171502;
double r171511 = r171508 / r171510;
double r171512 = -2.874102223994037e-279;
bool r171513 = r171497 <= r171512;
double r171514 = r171497 * r171497;
double r171515 = r171510 * r171503;
double r171516 = r171514 - r171515;
double r171517 = sqrt(r171516);
double r171518 = r171500 + r171517;
double r171519 = sqrt(r171518);
double r171520 = r171519 * r171519;
double r171521 = r171520 / r171510;
double r171522 = 2445759453.473797;
bool r171523 = r171497 <= r171522;
double r171524 = 1.0;
double r171525 = r171500 - r171517;
double r171526 = r171525 / r171503;
double r171527 = r171524 * r171526;
double r171528 = r171524 / r171527;
double r171529 = -0.5;
double r171530 = r171503 / r171497;
double r171531 = r171529 * r171530;
double r171532 = r171523 ? r171528 : r171531;
double r171533 = r171513 ? r171521 : r171532;
double r171534 = r171499 ? r171511 : r171533;
return r171534;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -3.2376935939558906e+66Initial program 41.5
Taylor expanded around -inf 10.4
if -3.2376935939558906e+66 < b < -2.874102223994037e-279Initial program 9.7
rmApplied add-sqr-sqrt10.0
if -2.874102223994037e-279 < b < 2445759453.473797Initial program 25.5
rmApplied flip-+25.5
Simplified17.7
rmApplied associate-/r*17.6
Simplified17.6
rmApplied clear-num17.7
Simplified17.6
rmApplied *-un-lft-identity17.6
Applied *-un-lft-identity17.6
Applied times-frac17.6
Applied associate-/l*17.7
Simplified10.9
if 2445759453.473797 < b Initial program 56.2
rmApplied flip-+56.2
Simplified26.9
rmApplied associate-/r*26.9
Simplified26.9
rmApplied clear-num27.0
Simplified27.0
Taylor expanded around inf 4.9
Final simplification8.6
herbie shell --seed 2020059
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))