\frac{x}{y + x}
\frac{x}{x + y}
(FPCore (x y) :precision binary64 (/ x (+ y x)))
(FPCore (x y) :precision binary64 (/ x (+ x y)))
double code(double x, double y) {
return x / (y + x);
}
double code(double x, double y) {
return x / (x + y);
}



Bits error versus x



Bits error versus y
Results
Initial program 0.0
Applied div-inv_binary640.2
Applied *-un-lft-identity_binary640.2
Applied associate-*l*_binary640.2
Simplified0.0
Final simplification0.0
herbie shell --seed 2022125
(FPCore (x y)
:name "AI.Clustering.Hierarchical.Internal:average from clustering-0.2.1, B"
:precision binary64
(/ x (+ y x)))