\frac{x}{y \cdot 3}x \cdot \frac{\frac{1}{y}}{3}double f(double x, double y) {
double r89744499 = x;
double r89744500 = y;
double r89744501 = 3.0;
double r89744502 = r89744500 * r89744501;
double r89744503 = r89744499 / r89744502;
return r89744503;
}
double f(double x, double y) {
double r89744504 = x;
double r89744505 = 1.0;
double r89744506 = y;
double r89744507 = r89744505 / r89744506;
double r89744508 = 3.0;
double r89744509 = r89744507 / r89744508;
double r89744510 = r89744504 * r89744509;
return r89744510;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.2 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 0.2
rmApplied associate-/r*0.3
rmApplied *-un-lft-identity0.3
Applied div-inv0.3
Applied times-frac0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019173 +o rules:numerics
(FPCore (x y)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, C"
:herbie-target
(/ (/ x y) 3.0)
(/ x (* y 3.0)))