\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{\mathsf{fma}\left(\sqrt{\sqrt{\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \left(\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}}\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}double f(double a, double b, double c) {
double r2540670 = b;
double r2540671 = -r2540670;
double r2540672 = r2540670 * r2540670;
double r2540673 = 3.0;
double r2540674 = a;
double r2540675 = r2540673 * r2540674;
double r2540676 = c;
double r2540677 = r2540675 * r2540676;
double r2540678 = r2540672 - r2540677;
double r2540679 = sqrt(r2540678);
double r2540680 = r2540671 + r2540679;
double r2540681 = r2540680 / r2540675;
return r2540681;
}
double f(double a, double b, double c) {
double r2540682 = -3.0;
double r2540683 = a;
double r2540684 = c;
double r2540685 = r2540683 * r2540684;
double r2540686 = b;
double r2540687 = r2540686 * r2540686;
double r2540688 = fma(r2540682, r2540685, r2540687);
double r2540689 = r2540688 * r2540688;
double r2540690 = r2540689 * r2540688;
double r2540691 = 0.3333333333333333;
double r2540692 = pow(r2540690, r2540691);
double r2540693 = cbrt(r2540692);
double r2540694 = r2540693 * r2540693;
double r2540695 = r2540693 * r2540694;
double r2540696 = sqrt(r2540695);
double r2540697 = sqrt(r2540696);
double r2540698 = sqrt(r2540688);
double r2540699 = sqrt(r2540698);
double r2540700 = -r2540686;
double r2540701 = fma(r2540697, r2540699, r2540700);
double r2540702 = 3.0;
double r2540703 = r2540683 * r2540702;
double r2540704 = r2540701 / r2540703;
return r2540704;
}



Bits error versus a



Bits error versus b



Bits error versus c
Initial program 44.1
Simplified44.1
rmApplied add-sqr-sqrt44.1
Applied sqrt-prod44.0
Applied fma-neg43.4
rmApplied add-cbrt-cube43.5
rmApplied pow1/343.1
rmApplied add-cube-cbrt43.0
Final simplification43.0
herbie shell --seed 2019153 +o rules:numerics
(FPCore (a b c)
:name "Cubic critical, medium range"
:pre (and (< 1.1102230246251565e-16 a 9007199254740992.0) (< 1.1102230246251565e-16 b 9007199254740992.0) (< 1.1102230246251565e-16 c 9007199254740992.0))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))