\frac{x}{y \cdot 3}\frac{\frac{x}{3}}{y}(FPCore (x y) :precision binary64 (/ x (* y 3.0)))
(FPCore (x y) :precision binary64 (/ (/ x 3.0) y))
double code(double x, double y) {
return x / (y * 3.0);
}
double code(double x, double y) {
return (x / 3.0) / y;
}







Bits error versus x







Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 320 |
| Alternative 2 | |
|---|---|
| Error | 53.0 |
| Cost | 64 |
| Alternative 3 | |
|---|---|
| Error | 61.7 |
| Cost | 64 |

Initial program 0.3
rmApplied *-un-lft-identity_binary64_212200.3
Applied times-frac_binary64_212260.3
rmApplied associate-*l/_binary64_211630.2
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2021044
(FPCore (x y)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, C"
:precision binary64
:herbie-target
(/ (/ x y) 3.0)
(/ x (* y 3.0)))