\left(x \cdot y + x\right) + y
x + \left(x + 1\right) \cdot y
(FPCore (x y) :precision binary64 (+ (+ (* x y) x) y))
(FPCore (x y) :precision binary64 (+ x (* (+ x 1.0) y)))
double code(double x, double y) {
return ((x * y) + x) + y;
}
double code(double x, double y) {
return x + ((x + 1.0) * y);
}



Bits error versus x



Bits error versus y
Results
Initial program 0.0
Taylor expanded around 0 0.0
Simplified0.0
Taylor expanded around 0 0.0
Simplified0.0
rmApplied distribute-rgt1-in_binary640.0
Final simplification0.0
herbie shell --seed 2021110
(FPCore (x y)
:name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
:precision binary64
(+ (+ (* x y) x) y))