\frac{x}{y \cdot 3}\frac{x}{3 \cdot y}double f(double x, double y) {
double r722224 = x;
double r722225 = y;
double r722226 = 3.0;
double r722227 = r722225 * r722226;
double r722228 = r722224 / r722227;
return r722228;
}
double f(double x, double y) {
double r722229 = x;
double r722230 = 3.0;
double r722231 = y;
double r722232 = r722230 * r722231;
double r722233 = r722229 / r722232;
return r722233;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied times-frac0.3
rmApplied frac-times0.3
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2020033 +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)))