double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x + y)) - z)) / ((double) (t * 2.0))));
}
double code(double x, double y, double z, double t) {
return ((double) (0.5 * ((double) (((double) (y / t)) + ((double) (((double) (x - z)) / t))))));
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Results
Initial program 0.1
Taylor expanded around 0 0.1
Simplified0.2
Taylor expanded around 0 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020191
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
:precision binary64
(/ (- (+ x y) z) (* t 2.0)))