\left(2 + x\right) - 2
x
double code(double x) {
return ((double) (((double) (2.0 + x)) - 2.0));
}
double code(double x) {
return x;
}



Bits error versus x
Results
Initial program 29.6
Simplified0
Final simplification0
herbie shell --seed 2020152
(FPCore (x)
:name "(- (+ 2 x) 2)"
:precision binary64
(- (+ 2.0 x) 2.0))