double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t))));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((x <= -1.057502676775945e-226) || !(x <= 9.027701986314331e-242))) {
VAR = ((double) (x + ((double) (((double) (z - x)) * ((double) (y / t))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) (((double) cbrt(y)) * ((double) cbrt(y)))) * ((double) (((double) (z - x)) * ((double) cbrt(y)))))) / t))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.5 |
|---|---|
| Target | 2.0 |
| Herbie | 2.0 |
if x < -1.05750267677594508e-226 or 9.02770198631433139e-242 < x Initial program 6.7
rmApplied add-cube-cbrt7.1
Applied associate-/r*7.1
Simplified2.6
rmApplied *-un-lft-identity2.6
Applied cbrt-prod2.6
Applied times-frac1.9
Simplified1.9
Simplified1.4
if -1.05750267677594508e-226 < x < 9.02770198631433139e-242Initial program 5.2
rmApplied add-cube-cbrt5.9
Applied associate-*l*6.0
Simplified6.0
Final simplification2.0
herbie shell --seed 2020180
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (neg z) (/ y t))))
(+ x (/ (* y (- z x)) t)))