\frac{x \cdot \left(y - z\right)}{t - z}x \cdot \left(\frac{y}{t - z} - \frac{z}{t - z}\right)(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
(FPCore (x y z t) :precision binary64 (* x (- (/ y (- t z)) (/ z (- t z)))))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
double code(double x, double y, double z, double t) {
return x * ((y / (t - z)) - (z / (t - z)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.7 |
|---|---|
| Target | 2.2 |
| Herbie | 2.2 |
Initial program 11.7
rmApplied *-un-lft-identity_binary64_1610511.7
Applied times-frac_binary64_161112.2
Simplified2.2
rmApplied div-sub_binary64_161102.2
Final simplification2.2
herbie shell --seed 2020355
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))