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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.8 |
|---|---|
| Target | 1.4 |
| Herbie | 1.4 |
Initial program 14.8
Simplified6.1
rmApplied add-cube-cbrt_binary646.9
Applied add-cube-cbrt_binary647.1
Applied times-frac_binary647.1
Applied associate-*r*_binary642.1
rmApplied times-frac_binary642.1
Applied associate-*r*_binary641.4
Final simplification1.4
herbie shell --seed 2020253
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
:precision binary64
:herbie-target
(if (< (/ (* (/ y z) t) t) -1.20672205123045e+245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.907522236933906e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.658954423153415e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e+217) (* x (/ y z)) (/ (* y x) z)))))
(* x (/ (* (/ y z) t) t)))