\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 7.454923183150117 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{1}{3}}{\frac{a}{\sqrt{\mathsf{fma}\left(c, \left(-3 \cdot a\right), \left(b \cdot b\right)\right)} - b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{-2 \cdot \frac{b}{c}}\\
\end{array}double f(double a, double b, double c, double __attribute__((unused)) d) {
double r2926796 = b;
double r2926797 = -r2926796;
double r2926798 = r2926796 * r2926796;
double r2926799 = 3.0;
double r2926800 = a;
double r2926801 = r2926799 * r2926800;
double r2926802 = c;
double r2926803 = r2926801 * r2926802;
double r2926804 = r2926798 - r2926803;
double r2926805 = sqrt(r2926804);
double r2926806 = r2926797 + r2926805;
double r2926807 = r2926806 / r2926801;
return r2926807;
}
double f(double a, double b, double c, double __attribute__((unused)) d) {
double r2926808 = b;
double r2926809 = 7.454923183150117e-53;
bool r2926810 = r2926808 <= r2926809;
double r2926811 = 0.3333333333333333;
double r2926812 = a;
double r2926813 = c;
double r2926814 = -3.0;
double r2926815 = r2926814 * r2926812;
double r2926816 = r2926808 * r2926808;
double r2926817 = fma(r2926813, r2926815, r2926816);
double r2926818 = sqrt(r2926817);
double r2926819 = r2926818 - r2926808;
double r2926820 = r2926812 / r2926819;
double r2926821 = r2926811 / r2926820;
double r2926822 = 1.0;
double r2926823 = -2.0;
double r2926824 = r2926808 / r2926813;
double r2926825 = r2926823 * r2926824;
double r2926826 = r2926822 / r2926825;
double r2926827 = r2926810 ? r2926821 : r2926826;
return r2926827;
}



Bits error versus a



Bits error versus b



Bits error versus c



Bits error versus d
if b < 7.454923183150117e-53Initial program 22.0
Simplified21.9
rmApplied *-un-lft-identity21.9
Applied *-un-lft-identity21.9
Applied distribute-lft-out--21.9
Applied associate-/l*22.0
rmApplied *-un-lft-identity22.0
Applied *-un-lft-identity22.0
Applied distribute-lft-out--22.0
Applied times-frac22.0
Applied associate-/r*22.0
Simplified22.0
rmApplied *-un-lft-identity22.0
Applied associate-/r*22.0
Simplified22.0
if 7.454923183150117e-53 < b Initial program 53.7
Simplified53.7
rmApplied *-un-lft-identity53.7
Applied *-un-lft-identity53.7
Applied distribute-lft-out--53.7
Applied associate-/l*53.8
Taylor expanded around 0 8.7
Final simplification17.1
herbie shell --seed 2019130 +o rules:numerics
(FPCore (a b c d)
:name "Cubic critical"
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))