\frac{x}{y \cdot 3}\frac{\frac{x}{3}}{y}double f(double x, double y) {
double r846317 = x;
double r846318 = y;
double r846319 = 3.0;
double r846320 = r846318 * r846319;
double r846321 = r846317 / r846320;
return r846321;
}
double f(double x, double y) {
double r846322 = x;
double r846323 = 3.0;
double r846324 = r846322 / r846323;
double r846325 = y;
double r846326 = r846324 / r846325;
return r846326;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied times-frac0.3
rmApplied div-inv0.4
Applied associate-*r*0.4
Simplified0.4
rmApplied associate-*l/0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2020021 +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)))