\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\frac{x + \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z \cdot t - x}} \cdot \left(z \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z \cdot t - x}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z \cdot t - x}}\right)\right) - \frac{x}{z \cdot t - x}\right)}{x + 1}double code(double x, double y, double z, double t) {
return (((double) (x + (((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) (x + ((double) (((double) ((((double) cbrt(y)) / ((double) cbrt(((double) (((double) (z * t)) - x))))) * ((double) (z * ((double) ((((double) cbrt(y)) / ((double) cbrt(((double) (((double) (z * t)) - x))))) * (((double) cbrt(y)) / ((double) cbrt(((double) (((double) (z * t)) - x))))))))))) - (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.3 |
|---|---|
| Target | 0.4 |
| Herbie | 2.8 |
Initial program Error: 7.3 bits
rmApplied div-subError: 7.3 bits
SimplifiedError: 4.6 bits
SimplifiedError: 4.6 bits
rmApplied add-cube-cbrtError: 4.9 bits
Applied add-cube-cbrtError: 4.9 bits
Applied times-fracError: 4.9 bits
Applied associate-*r*Error: 2.8 bits
SimplifiedError: 2.8 bits
Final simplificationError: 2.8 bits
herbie shell --seed 2020200
(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)))