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




Bits error versus x




Bits error versus y
Results
| Original | 10.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 10.2
rmApplied associate-/r*0.2
rmApplied clear-num0.7
rmApplied associate-/r/0.7
Applied add-cube-cbrt0.7
Applied times-frac0.3
rmApplied associate-*l/0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2020124
(FPCore (x y)
:name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"
:precision binary64
:herbie-target
(/ (/ x y) y)
(/ x (* y y)))