\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 228.26278739030357:\\
\;\;\;\;\frac{\frac{\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right) - {b}^{2}}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}{3 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\
\end{array}double f(double a, double b, double c) {
double r38841 = b;
double r38842 = -r38841;
double r38843 = r38841 * r38841;
double r38844 = 3.0;
double r38845 = a;
double r38846 = r38844 * r38845;
double r38847 = c;
double r38848 = r38846 * r38847;
double r38849 = r38843 - r38848;
double r38850 = sqrt(r38849);
double r38851 = r38842 + r38850;
double r38852 = r38851 / r38846;
return r38852;
}
double f(double a, double b, double c) {
double r38853 = b;
double r38854 = 228.26278739030357;
bool r38855 = r38853 <= r38854;
double r38856 = r38853 * r38853;
double r38857 = 3.0;
double r38858 = a;
double r38859 = r38857 * r38858;
double r38860 = c;
double r38861 = r38859 * r38860;
double r38862 = r38856 - r38861;
double r38863 = 2.0;
double r38864 = pow(r38853, r38863);
double r38865 = r38862 - r38864;
double r38866 = sqrt(r38862);
double r38867 = r38866 + r38853;
double r38868 = r38865 / r38867;
double r38869 = r38868 / r38859;
double r38870 = -0.5;
double r38871 = r38860 / r38853;
double r38872 = r38870 * r38871;
double r38873 = r38855 ? r38869 : r38872;
return r38873;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
if b < 228.26278739030357Initial program 16.3
Simplified16.3
rmApplied flip--16.3
Simplified15.3
if 228.26278739030357 < b Initial program 35.6
Simplified35.6
Taylor expanded around inf 16.9
rmApplied *-un-lft-identity16.9
Applied times-frac16.8
Applied associate-*r*16.8
Simplified16.8
Taylor expanded around 0 16.8
Final simplification16.3
herbie shell --seed 2020045
(FPCore (a b c)
:name "Cubic critical, narrow range"
:precision binary64
:pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))