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




Bits error versus x




Bits error versus y
Results
| Original | 7.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 7.2
Applied *-un-lft-identity_binary647.2
Applied times-frac_binary640.2
Applied associate-*r/_binary640.2
Applied frac-2neg_binary640.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2022068
(FPCore (x y)
:name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"
:precision binary64
:herbie-target
(/ (/ x y) y)
(/ x (* y y)))