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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.5 |
| Herbie | 1.0 |
Initial program Error: 2.2 bits
rmApplied add-cube-cbrtError: 2.7 bits
Applied add-cube-cbrtError: 2.9 bits
Applied times-fracError: 2.8 bits
Applied associate-*l*Error: 1.0 bits
SimplifiedError: 1.0 bits
Final simplificationError: 1.0 bits
herbie shell --seed 2020204
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))