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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.6 |
|---|---|
| Target | 1.5 |
| Herbie | 3.0 |
Initial program 14.6
Simplified6.6
rmApplied add-cube-cbrt7.4
Applied *-un-lft-identity7.4
Applied times-frac7.4
Applied associate-*r*5.9
Simplified5.9
rmApplied add-cube-cbrt6.1
Applied times-frac6.1
Applied associate-*l*3.0
Final simplification3.0
herbie shell --seed 2020152
(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)))