\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.1214182120130159 \cdot 10^{148}:\\
\;\;\;\;\frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}{3 \cdot a}\\
\mathbf{elif}\;b \le -1.7247047038424937 \cdot 10^{-216}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}} \cdot \sqrt[3]{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}\right) \cdot \sqrt[3]{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a}\\
\mathbf{elif}\;b \le 4.3957752798560445 \cdot 10^{108}:\\
\;\;\;\;\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{b}{c}}\\
\end{array}double f(double a, double b, double c) {
double r105253 = b;
double r105254 = -r105253;
double r105255 = r105253 * r105253;
double r105256 = 3.0;
double r105257 = a;
double r105258 = r105256 * r105257;
double r105259 = c;
double r105260 = r105258 * r105259;
double r105261 = r105255 - r105260;
double r105262 = sqrt(r105261);
double r105263 = r105254 + r105262;
double r105264 = r105263 / r105258;
return r105264;
}
double f(double a, double b, double c) {
double r105265 = b;
double r105266 = -1.1214182120130159e+148;
bool r105267 = r105265 <= r105266;
double r105268 = -r105265;
double r105269 = 1.5;
double r105270 = a;
double r105271 = c;
double r105272 = r105270 * r105271;
double r105273 = r105272 / r105265;
double r105274 = r105269 * r105273;
double r105275 = r105274 - r105265;
double r105276 = r105268 + r105275;
double r105277 = 3.0;
double r105278 = r105277 * r105270;
double r105279 = r105276 / r105278;
double r105280 = -1.7247047038424937e-216;
bool r105281 = r105265 <= r105280;
double r105282 = r105265 * r105265;
double r105283 = r105278 * r105271;
double r105284 = r105282 - r105283;
double r105285 = sqrt(r105284);
double r105286 = r105268 + r105285;
double r105287 = cbrt(r105286);
double r105288 = r105287 * r105287;
double r105289 = r105288 * r105287;
double r105290 = r105289 / r105278;
double r105291 = 4.3957752798560445e+108;
bool r105292 = r105265 <= r105291;
double r105293 = 1.0;
double r105294 = 1.0;
double r105295 = r105268 - r105285;
double r105296 = r105295 / r105271;
double r105297 = r105294 * r105296;
double r105298 = r105293 / r105297;
double r105299 = -2.0;
double r105300 = r105265 / r105271;
double r105301 = r105299 * r105300;
double r105302 = r105293 / r105301;
double r105303 = r105292 ? r105298 : r105302;
double r105304 = r105281 ? r105290 : r105303;
double r105305 = r105267 ? r105279 : r105304;
return r105305;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -1.1214182120130159e+148Initial program 60.1
Taylor expanded around -inf 11.3
if -1.1214182120130159e+148 < b < -1.7247047038424937e-216Initial program 7.0
rmApplied add-cube-cbrt7.9
if -1.7247047038424937e-216 < b < 4.3957752798560445e+108Initial program 30.2
rmApplied flip-+30.3
Simplified17.1
rmApplied *-un-lft-identity17.1
Applied *-un-lft-identity17.1
Applied times-frac17.1
Applied associate-/l*17.3
Simplified16.6
Taylor expanded around 0 10.7
rmApplied div-inv10.7
Applied associate-*l*10.7
Simplified10.7
if 4.3957752798560445e+108 < b Initial program 60.4
rmApplied flip-+60.4
Simplified32.8
rmApplied *-un-lft-identity32.8
Applied *-un-lft-identity32.8
Applied times-frac32.8
Applied associate-/l*32.9
Simplified31.6
Taylor expanded around 0 30.8
Taylor expanded around 0 3.5
Final simplification8.3
herbie shell --seed 2020062
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))