\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 -8.594947000714855189120603839967237527365 \cdot 10^{98}:\\
\;\;\;\;0.5 \cdot \frac{c}{b} - 0.6666666666666666296592325124947819858789 \cdot \frac{b}{a}\\
\mathbf{elif}\;b \le -2.312272680827216451791881279954599486801 \cdot 10^{-225}:\\
\;\;\;\;\frac{\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3}}{a}\\
\mathbf{elif}\;b \le 2.269665110513950885787223322334260534415 \cdot 10^{61}:\\
\;\;\;\;\frac{1}{\frac{3}{c \cdot 3} \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\
\end{array}double f(double a, double b, double c) {
double r110339 = b;
double r110340 = -r110339;
double r110341 = r110339 * r110339;
double r110342 = 3.0;
double r110343 = a;
double r110344 = r110342 * r110343;
double r110345 = c;
double r110346 = r110344 * r110345;
double r110347 = r110341 - r110346;
double r110348 = sqrt(r110347);
double r110349 = r110340 + r110348;
double r110350 = r110349 / r110344;
return r110350;
}
double f(double a, double b, double c) {
double r110351 = b;
double r110352 = -8.594947000714855e+98;
bool r110353 = r110351 <= r110352;
double r110354 = 0.5;
double r110355 = c;
double r110356 = r110355 / r110351;
double r110357 = r110354 * r110356;
double r110358 = 0.6666666666666666;
double r110359 = a;
double r110360 = r110351 / r110359;
double r110361 = r110358 * r110360;
double r110362 = r110357 - r110361;
double r110363 = -2.3122726808272165e-225;
bool r110364 = r110351 <= r110363;
double r110365 = r110351 * r110351;
double r110366 = 3.0;
double r110367 = r110366 * r110359;
double r110368 = r110367 * r110355;
double r110369 = r110365 - r110368;
double r110370 = sqrt(r110369);
double r110371 = r110370 - r110351;
double r110372 = r110371 / r110366;
double r110373 = r110372 / r110359;
double r110374 = 2.269665110513951e+61;
bool r110375 = r110351 <= r110374;
double r110376 = 1.0;
double r110377 = r110355 * r110366;
double r110378 = r110366 / r110377;
double r110379 = -r110351;
double r110380 = r110379 - r110370;
double r110381 = r110378 * r110380;
double r110382 = r110376 / r110381;
double r110383 = -0.5;
double r110384 = r110383 * r110356;
double r110385 = r110375 ? r110382 : r110384;
double r110386 = r110364 ? r110373 : r110385;
double r110387 = r110353 ? r110362 : r110386;
return r110387;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < -8.594947000714855e+98Initial program 46.3
Taylor expanded around -inf 4.0
if -8.594947000714855e+98 < b < -2.3122726808272165e-225Initial program 8.2
rmApplied associate-/r*8.2
Simplified8.2
if -2.3122726808272165e-225 < b < 2.269665110513951e+61Initial program 27.4
rmApplied flip-+27.6
Simplified16.2
rmApplied *-un-lft-identity16.2
Applied *-un-lft-identity16.2
Applied times-frac16.2
Applied associate-/l*16.3
Simplified16.3
rmApplied *-un-lft-identity16.3
Applied times-frac14.5
Applied times-frac10.9
Simplified10.9
Simplified10.4
if 2.269665110513951e+61 < b Initial program 57.4
Taylor expanded around inf 4.0
Final simplification7.1
herbie shell --seed 2019304 +o rules:numerics
(FPCore (a b c)
:name "Cubic critical"
:precision binary64
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))