\frac{x}{y \cdot 3}\frac{\frac{x}{3}}{y}double f(double x, double y) {
double r504023 = x;
double r504024 = y;
double r504025 = 3.0;
double r504026 = r504024 * r504025;
double r504027 = r504023 / r504026;
return r504027;
}
double f(double x, double y) {
double r504028 = x;
double r504029 = 3.0;
double r504030 = r504028 / r504029;
double r504031 = y;
double r504032 = r504030 / r504031;
return r504032;
}




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 *-un-lft-identity0.3
Applied div-inv0.4
Applied times-frac0.3
Simplified0.3
Final simplification0.2
herbie shell --seed 2019303
(FPCore (x y)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, C"
:precision binary64
:herbie-target
(/ (/ x y) 3)
(/ x (* y 3)))