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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.3 |
| Herbie | 1.2 |
Initial program Error: 2.1 bits
rmApplied add-cube-cbrtError: 2.6 bits
Applied *-un-lft-identityError: 2.6 bits
Applied times-fracError: 2.6 bits
Applied associate-*r*Error: 4.4 bits
SimplifiedError: 4.4 bits
rmApplied add-cube-cbrtError: 4.5 bits
Applied times-fracError: 4.5 bits
Applied associate-*l*Error: 1.2 bits
SimplifiedError: 1.2 bits
Final simplificationError: 1.2 bits
herbie shell --seed 2020204
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))