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)))))) <= -3.0127902801780714e-287)) {
VAR = ((double) (x + ((double) (((double) (((double) (((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z)))))))) * ((double) (((double) cbrt(((double) (t - x)))) * ((double) cbrt(((double) (t - x)))))))) * ((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.1 |
|---|---|
| Target | 12.0 |
| Herbie | 9.2 |
if (+ x (/ (* (- y z) (- t x)) (- a z))) < -3.0127902801780714e-287Initial program 21.0
Simplified10.7
rmApplied add-cube-cbrt11.3
Applied *-un-lft-identity11.3
Applied times-frac11.3
Applied associate-*r*8.1
Simplified8.2
rmApplied *-un-lft-identity8.2
Applied add-cube-cbrt8.4
Applied times-frac8.4
Applied associate-*r*7.6
Simplified7.6
if -3.0127902801780714e-287 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 0.0Initial program 59.6
Simplified59.7
Taylor expanded around inf 20.1
Simplified22.9
if 0.0 < (+ x (/ (* (- y z) (- t x)) (- a z))) Initial program 20.7
Simplified10.1
rmApplied add-cube-cbrt10.8
Applied *-un-lft-identity10.8
Applied times-frac10.8
Applied associate-*r*8.2
Simplified8.2
Final simplification9.2
herbie shell --seed 2020192
(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))))