\frac{x}{y \cdot 3}\frac{\frac{x}{3}}{y}double f(double x, double y) {
double r29986054 = x;
double r29986055 = y;
double r29986056 = 3.0;
double r29986057 = r29986055 * r29986056;
double r29986058 = r29986054 / r29986057;
return r29986058;
}
double f(double x, double y) {
double r29986059 = x;
double r29986060 = 3.0;
double r29986061 = r29986059 / r29986060;
double r29986062 = y;
double r29986063 = r29986061 / r29986062;
return r29986063;
}




Bits error versus x




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