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




Bits error versus x




Bits error versus y
Results
| Original | 9.8 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 9.8
rmApplied *-un-lft-identity_binary64_103089.8
Applied times-frac_binary64_103140.2
rmApplied associate-*r/_binary64_102500.2
Final simplification0.2
herbie shell --seed 2021027
(FPCore (x y)
:name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"
:precision binary64
:herbie-target
(/ (/ x y) y)
(/ x (* y y)))