\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 r11899 = b;
double r11900 = -r11899;
double r11901 = r11899 * r11899;
double r11902 = 3.0;
double r11903 = a;
double r11904 = r11902 * r11903;
double r11905 = c;
double r11906 = r11904 * r11905;
double r11907 = r11901 - r11906;
double r11908 = sqrt(r11907);
double r11909 = r11900 + r11908;
double r11910 = r11909 / r11904;
return r11910;
}
double f(double a, double b, double c) {
double r11911 = b;
double r11912 = 228.26278739030357;
bool r11913 = r11911 <= r11912;
double r11914 = r11911 * r11911;
double r11915 = 3.0;
double r11916 = a;
double r11917 = r11915 * r11916;
double r11918 = c;
double r11919 = r11917 * r11918;
double r11920 = r11914 - r11919;
double r11921 = 2.0;
double r11922 = pow(r11911, r11921);
double r11923 = r11920 - r11922;
double r11924 = sqrt(r11920);
double r11925 = r11924 + r11911;
double r11926 = r11923 / r11925;
double r11927 = r11926 / r11917;
double r11928 = -0.5;
double r11929 = r11918 / r11911;
double r11930 = r11928 * r11929;
double r11931 = r11913 ? r11927 : r11930;
return r11931;
}



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)))