\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}x + \left(\frac{-0.3333333333333333}{z} \cdot y + \left(t \cdot \frac{0.3333333333333333}{z}\right) \cdot \frac{1}{y}\right)(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
(FPCore (x y z t) :precision binary64 (+ x (+ (* (/ -0.3333333333333333 z) y) (* (* t (/ 0.3333333333333333 z)) (/ 1.0 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 + (((-0.3333333333333333 / z) * y) + ((t * (0.3333333333333333 / z)) * (1.0 / y)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.4 |
|---|---|
| Target | 1.7 |
| Herbie | 1.8 |
Initial program 3.4
Simplified3.8
rmApplied div-inv_binary643.8
rmApplied sub-neg_binary643.8
Applied distribute-lft-in_binary643.8
Simplified3.8
Simplified3.8
rmApplied div-inv_binary643.8
Applied associate-*r*_binary641.8
Final simplification1.8
herbie shell --seed 2020220
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))