\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\left(x - \frac{y}{z \cdot 3}\right) + \frac{0.333333333333333315 \cdot \frac{t}{z}}{y}double code(double x, double y, double z, double t) {
return ((x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)));
}
double code(double x, double y, double z, double t) {
return ((x - (y / (z * 3.0))) + ((0.3333333333333333 * (t / z)) / y));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.8 |
|---|---|
| Target | 1.5 |
| Herbie | 1.6 |
Initial program 3.8
rmApplied associate-/r*1.5
Taylor expanded around 0 1.6
Final simplification1.6
herbie shell --seed 2020100
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y))
(+ (- x (/ y (* z 3))) (/ t (* (* z 3) y))))