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




Bits error versus x




Bits error versus y
Results
| Original | 10.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 10.2
rmApplied clear-num_binary6410.4
Simplified0.6
rmApplied div-inv_binary640.7
Applied associate-/r*_binary640.3
Final simplification0.3
herbie shell --seed 2020210
(FPCore (x y)
:name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"
:precision binary64
:herbie-target
(/ (/ x y) y)
(/ x (* y y)))