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




Bits error versus x




Bits error versus y
Results
| Original | 0.2 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
Initial program 0.2
rmApplied *-commutative0.2
Applied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020113 +o rules:numerics
(FPCore (x y)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, C"
:precision binary64
:herbie-target
(/ (/ x y) 3)
(/ x (* y 3)))