\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 r2749799 = b;
double r2749800 = -r2749799;
double r2749801 = r2749799 * r2749799;
double r2749802 = 3.0;
double r2749803 = a;
double r2749804 = r2749802 * r2749803;
double r2749805 = c;
double r2749806 = r2749804 * r2749805;
double r2749807 = r2749801 - r2749806;
double r2749808 = sqrt(r2749807);
double r2749809 = r2749800 + r2749808;
double r2749810 = r2749809 / r2749804;
return r2749810;
}
double f(double a, double b, double c) {
double r2749811 = -3.0;
double r2749812 = a;
double r2749813 = c;
double r2749814 = r2749812 * r2749813;
double r2749815 = b;
double r2749816 = r2749815 * r2749815;
double r2749817 = fma(r2749811, r2749814, r2749816);
double r2749818 = r2749817 * r2749817;
double r2749819 = r2749818 * r2749817;
double r2749820 = 0.3333333333333333;
double r2749821 = pow(r2749819, r2749820);
double r2749822 = cbrt(r2749821);
double r2749823 = r2749822 * r2749822;
double r2749824 = r2749822 * r2749823;
double r2749825 = sqrt(r2749824);
double r2749826 = sqrt(r2749825);
double r2749827 = sqrt(r2749817);
double r2749828 = sqrt(r2749827);
double r2749829 = -r2749815;
double r2749830 = fma(r2749826, r2749828, r2749829);
double r2749831 = 3.0;
double r2749832 = r2749812 * r2749831;
double r2749833 = r2749830 / r2749832;
return r2749833;
}



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