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 ((((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))))) <= -1.7040269325864594e-279)) {
VAR = ((double) (x + ((double) (((double) (((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z)))))) * ((double) (((double) (((double) cbrt(((double) (y - z)))) * ((double) cbrt(((double) (y - z)))))) * ((double) (((double) (((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z)))))) * ((double) (((double) cbrt(((double) (y - z)))) * ((double) (((double) cbrt(((double) (t - x)))) / ((double) cbrt(((double) (a - z))))))))))))))));
} else {
double VAR_1;
if ((((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))))) <= 0.0)) {
VAR_1 = ((double) (t + ((double) (y * ((double) (((double) (x / z)) - ((double) (t / z))))))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))) * ((double) (((double) (t - x)) / ((double) cbrt(((double) (a - z))))))))));
}
VAR = VAR_1;
}
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.6 |
|---|---|
| Target | 12.2 |
| Herbie | 9.2 |
if (+ x (/ (* (- y z) (- t x)) (- a z))) < -1.70402693258645937e-279Initial program 21.0
Simplified10.5
rmApplied add-cube-cbrt11.0
Applied add-cube-cbrt11.2
Applied times-frac11.2
Applied associate-*r*7.7
Simplified7.8
rmApplied add-cube-cbrt7.8
Applied associate-*l*7.8
Simplified7.4
if -1.70402693258645937e-279 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 0.0Initial program 58.7
Simplified59.0
Taylor expanded around inf 20.2
Simplified22.2
if 0.0 < (+ x (/ (* (- y z) (- t x)) (- a z))) Initial program 21.4
Simplified11.0
rmApplied add-cube-cbrt11.6
Applied *-un-lft-identity11.6
Applied times-frac11.6
Applied associate-*r*8.3
Simplified8.3
Final simplification9.2
herbie shell --seed 2020190
(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))))