\frac{\left|x - y\right|}{\left|y\right|}\frac{\left|x - y\right|}{\left|y\right|}double code(double x, double y) {
return (fabs((x - y)) / fabs(y));
}
double code(double x, double y) {
return (fabs((x - y)) / fabs(y));
}



Bits error versus x



Bits error versus y
Results
Initial program 0.0
Final simplification0.0
herbie shell --seed 2020091
(FPCore (x y)
:name "Numeric.LinearAlgebra.Util:formatSparse from hmatrix-0.16.1.5"
:precision binary64
(/ (fabs (- x y)) (fabs y)))