\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 -1.56941706508999029 \cdot 10^{163}:\\
\;\;\;\;\frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}{3 \cdot a}\\
\mathbf{elif}\;b \le -8.7337006906970859 \cdot 10^{-271}:\\
\;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\\
\mathbf{elif}\;b \le 1.8041467096464137 \cdot 10^{153}:\\
\;\;\;\;\frac{\frac{3 \cdot \left(a \cdot c\right) + 0}{\left(-b\right) - \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1.5 \cdot \frac{a \cdot c}{b}}{3 \cdot a}\\
\end{array}double code(double a, double b, double c) {
return ((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a));
}
double code(double a, double b, double c) {
double temp;
if ((b <= -1.5694170650899903e+163)) {
temp = ((-b + ((1.5 * ((a * c) / b)) - b)) / (3.0 * a));
} else {
double temp_1;
if ((b <= -8.733700690697086e-271)) {
temp_1 = ((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a));
} else {
double temp_2;
if ((b <= 1.8041467096464137e+153)) {
temp_2 = ((((3.0 * (a * c)) + 0.0) / (-b - sqrt(((b * b) - (3.0 * (a * c)))))) / (3.0 * a));
} else {
temp_2 = ((-1.5 * ((a * c) / b)) / (3.0 * a));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -1.5694170650899903e+163Initial program 64.0
rmApplied associate-*l*64.0
Taylor expanded around -inf 13.1
if -1.5694170650899903e+163 < b < -8.733700690697086e-271Initial program 9.8
if -8.733700690697086e-271 < b < 1.8041467096464137e+153Initial program 33.4
rmApplied associate-*l*33.4
rmApplied flip-+33.4
Simplified16.3
if 1.8041467096464137e+153 < b Initial program 63.8
Taylor expanded around inf 14.3
Final simplification13.5
herbie shell --seed 2020060
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))