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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.6 |
|---|---|
| Target | 0.4 |
| Herbie | 3.1 |
Initial program 7.6
rmApplied div-sub7.6
Simplified4.6
Simplified4.6
rmApplied add-cube-cbrt4.9
Applied *-un-lft-identity4.9
Applied times-frac4.9
Applied associate-*r*3.1
Simplified3.1
Final simplification3.1
herbie shell --seed 2020185
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))