x \cdot \frac{\frac{y}{z} \cdot t}{t}\frac{\sqrt[3]{y}}{\sqrt[3]{z}} \cdot \left(\left(x \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}\right) \cdot \frac{\sqrt[3]{-y} \cdot \sqrt[3]{-1}}{\sqrt[3]{z}}\right)(FPCore (x y z t) :precision binary64 (* x (/ (* (/ y z) t) t)))
(FPCore (x y z t) :precision binary64 (* (/ (cbrt y) (cbrt z)) (* (* x (/ (cbrt y) (cbrt z))) (/ (* (cbrt (- y)) (cbrt -1.0)) (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)) * ((x * (cbrt(y) / cbrt(z))) * ((cbrt(-y) * cbrt(-1.0)) / cbrt(z)));
}





Bits error versus x





Bits error versus y





Bits error versus z





Bits error versus t
Results
| Original | 14.6 |
|---|---|
| Target | 1.6 |
| Herbie | 1.4 |
| Alternative 1 | |
|---|---|
| Accuracy | 2.2 |
| Cost | 1792 |
Initial program 14.6
Simplified6.1
rmApplied add-cube-cbrt_binary64_233016.9
Applied add-cube-cbrt_binary64_233017.1
Applied times-frac_binary64_232727.1
Applied associate-*r*_binary64_232062.0
rmApplied times-frac_binary64_232722.0
Applied associate-*r*_binary64_232061.4
Taylor expanded around -inf 33.6
Simplified1.4
Final simplification1.4
herbie shell --seed 2020338
(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)))