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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.8 |
|---|---|
| Target | 1.6 |
| Herbie | 2.0 |
Initial program Error: 14.8 bits
SimplifiedError: 6.4 bits
rmApplied add-cube-cbrtError: 7.2 bits
Applied add-cube-cbrtError: 7.3 bits
Applied times-fracError: 7.3 bits
Applied associate-*r*Error: 2.0 bits
SimplifiedError: 2.0 bits
Final simplificationError: 2.0 bits
herbie shell --seed 2020204
(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)))