double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((z <= -1.380682506546204e+178) || !(z <= 2.0634608585796736e+222))) {
VAR = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))) * ((double) cbrt(((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))))))) * ((double) (((double) (t - x)) / ((double) cbrt(((double) cbrt(((double) (a - z))))))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.2 |
|---|---|
| Target | 11.6 |
| Herbie | 10.0 |
if z < -1.38068250654620404e178 or 2.06346085857967359e222 < z Initial program 48.8
Simplified30.6
Taylor expanded around inf 24.1
Simplified13.8
if -1.38068250654620404e178 < z < 2.06346085857967359e222Initial program 17.7
Simplified10.6
rmApplied add-cube-cbrt11.2
Applied *-un-lft-identity11.2
Applied times-frac11.2
Applied associate-*r*9.1
Simplified9.1
rmApplied add-cube-cbrt9.1
Applied cbrt-prod9.1
Applied *-un-lft-identity9.1
Applied times-frac9.2
Applied associate-*r*9.0
Simplified9.0
Final simplification10.0
herbie shell --seed 2020191
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))