\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 4.585517465995339 \cdot 10^{-129}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(c, \left(a \cdot -3\right), \left(b \cdot b\right)\right)} - b}{\frac{3}{\frac{1}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{-2 \cdot \frac{b}{c}}\\
\end{array}double f(double a, double b, double c, double __attribute__((unused)) d) {
double r2015275 = b;
double r2015276 = -r2015275;
double r2015277 = r2015275 * r2015275;
double r2015278 = 3.0;
double r2015279 = a;
double r2015280 = r2015278 * r2015279;
double r2015281 = c;
double r2015282 = r2015280 * r2015281;
double r2015283 = r2015277 - r2015282;
double r2015284 = sqrt(r2015283);
double r2015285 = r2015276 + r2015284;
double r2015286 = r2015285 / r2015280;
return r2015286;
}
double f(double a, double b, double c, double __attribute__((unused)) d) {
double r2015287 = b;
double r2015288 = 4.585517465995339e-129;
bool r2015289 = r2015287 <= r2015288;
double r2015290 = c;
double r2015291 = a;
double r2015292 = -3.0;
double r2015293 = r2015291 * r2015292;
double r2015294 = r2015287 * r2015287;
double r2015295 = fma(r2015290, r2015293, r2015294);
double r2015296 = sqrt(r2015295);
double r2015297 = r2015296 - r2015287;
double r2015298 = 3.0;
double r2015299 = 1.0;
double r2015300 = r2015299 / r2015291;
double r2015301 = r2015298 / r2015300;
double r2015302 = r2015297 / r2015301;
double r2015303 = -2.0;
double r2015304 = r2015287 / r2015290;
double r2015305 = r2015303 * r2015304;
double r2015306 = r2015299 / r2015305;
double r2015307 = r2015289 ? r2015302 : r2015306;
return r2015307;
}



Bits error versus a



Bits error versus b



Bits error versus c



Bits error versus d
if b < 4.585517465995339e-129Initial program 20.9
Simplified20.9
rmApplied *-un-lft-identity20.9
Applied *-un-lft-identity20.9
Applied distribute-lft-out--20.9
Applied associate-/l*21.0
rmApplied associate-/l*21.0
rmApplied div-inv21.0
Applied *-un-lft-identity21.0
Applied times-frac21.1
Applied associate-/r*21.0
Simplified21.0
if 4.585517465995339e-129 < b Initial program 49.8
Simplified49.8
rmApplied *-un-lft-identity49.8
Applied *-un-lft-identity49.8
Applied distribute-lft-out--49.8
Applied associate-/l*49.8
rmApplied associate-/l*49.8
Taylor expanded around 0 12.8
Final simplification17.4
herbie shell --seed 2019128 +o rules:numerics
(FPCore (a b c d)
:name "Cubic critical"
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))