\frac{x}{y \cdot y}\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{y}{x}} \cdot \frac{\sqrt[3]{1}}{y}double code(double x, double y) {
return (x / (y * y));
}
double code(double x, double y) {
return (((cbrt(1.0) * cbrt(1.0)) / (y / x)) * (cbrt(1.0) / y));
}




Bits error versus x




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