\left(a \cdot \left(x - y\right) + b \cdot \left(x - y\right)\right) + c \cdot \left(x - y\right)
\left(x - y\right) \cdot \left(\left(a + b\right) + c\right)
double code(double a, double x, double y, double b, double c) {
return ((double) (((double) (((double) (a * ((double) (x - y)))) + ((double) (b * ((double) (x - y)))))) + ((double) (c * ((double) (x - y))))));
}
double code(double a, double x, double y, double b, double c) {
return ((double) (((double) (x - y)) * ((double) (((double) (a + b)) + c))));
}



Bits error versus a



Bits error versus x



Bits error versus y



Bits error versus b



Bits error versus c
Results
Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020153
(FPCore (a x y b c)
:name "(+ (+ (* a (- x y)) (* b (- x y))) (* c (- x y)))"
:precision binary64
(+ (+ (* a (- x y)) (* b (- x y))) (* c (- x y))))