\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{\left({b}^{2} - {b}^{2}\right) + \left(3 \cdot a\right) \cdot c}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(\left(3 \cdot a\right) \cdot c\right)}}\right)}double f(double a, double b, double c) {
double r114825 = b;
double r114826 = -r114825;
double r114827 = r114825 * r114825;
double r114828 = 3.0;
double r114829 = a;
double r114830 = r114828 * r114829;
double r114831 = c;
double r114832 = r114830 * r114831;
double r114833 = r114827 - r114832;
double r114834 = sqrt(r114833);
double r114835 = r114826 + r114834;
double r114836 = r114835 / r114830;
return r114836;
}
double f(double a, double b, double c) {
double r114837 = b;
double r114838 = 2.0;
double r114839 = pow(r114837, r114838);
double r114840 = r114839 - r114839;
double r114841 = 3.0;
double r114842 = a;
double r114843 = r114841 * r114842;
double r114844 = c;
double r114845 = r114843 * r114844;
double r114846 = r114840 + r114845;
double r114847 = -r114837;
double r114848 = r114837 * r114837;
double r114849 = log(r114845);
double r114850 = exp(r114849);
double r114851 = r114848 - r114850;
double r114852 = sqrt(r114851);
double r114853 = r114847 - r114852;
double r114854 = r114843 * r114853;
double r114855 = r114846 / r114854;
return r114855;
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program 28.2
rmApplied flip-+28.2
Simplified0.6
rmApplied associate-*r*0.5
rmApplied div-inv0.5
Applied associate-/l*0.5
Simplified0.5
rmApplied add-exp-log0.5
Applied add-exp-log0.5
Applied add-exp-log0.5
Applied prod-exp0.5
Applied prod-exp0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2020033
(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)))