\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\frac{-c}{b + \sqrt{\frac{{b}^{4} - 3 \cdot \left(3 \cdot \left(a \cdot \left(a \cdot \left(c \cdot c\right)\right)\right)\right)}{3 \cdot \left(c \cdot a\right) + b \cdot b}}}(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
(FPCore (a b c)
:precision binary64
(/
(- c)
(+
b
(sqrt
(/
(- (pow b 4.0) (* 3.0 (* 3.0 (* a (* a (* c c))))))
(+ (* 3.0 (* c a)) (* b b)))))))double code(double a, double b, double c) {
return (((double) (((double) -(b)) + ((double) sqrt(((double) (((double) (b * b)) - ((double) (((double) (3.0 * a)) * c)))))))) / ((double) (3.0 * a)));
}
double code(double a, double b, double c) {
return (((double) -(c)) / ((double) (b + ((double) sqrt((((double) (((double) pow(b, 4.0)) - ((double) (3.0 * ((double) (3.0 * ((double) (a * ((double) (a * ((double) (c * c)))))))))))) / ((double) (((double) (3.0 * ((double) (c * a)))) + ((double) (b * b))))))))));
}



Bits error versus a



Bits error versus b



Bits error versus c
Results
Initial program Error: 28.9 bits
SimplifiedError: 28.9 bits
rmApplied flip--Error: 28.9 bits
SimplifiedError: 0.6 bits
SimplifiedError: 0.6 bits
rmApplied distribute-rgt-neg-outError: 0.6 bits
Applied distribute-rgt-neg-outError: 0.6 bits
Applied distribute-frac-negError: 0.6 bits
Applied distribute-frac-negError: 0.6 bits
SimplifiedError: 0.3 bits
rmApplied flip--Error: 0.3 bits
SimplifiedError: 0.3 bits
SimplifiedError: 0.3 bits
Final simplificationError: 0.3 bits
herbie shell --seed 2020203
(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.0 a) c)))) (* 3.0 a)))