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)))))) <= -7.624853213219643e-277) || !(((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))))) <= 3.305555106969341e-305))) {
VAR = ((double) (x + ((double) (((double) (t - x)) * ((double) (((double) (y - z)) / ((double) (a - z))))))));
} else {
VAR = ((double) (t + ((double) (((double) (y / z)) * ((double) (x - t))))));
}
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.7 |
|---|---|
| Target | 12.1 |
| Herbie | 8.0 |
if (+ x (/ (* (- y z) (- t x)) (- a z))) < -7.6248532132196434e-277 or 3.30555510696934e-305 < (+ x (/ (* (- y z) (- t x)) (- a z))) Initial program 21.4
Simplified10.5
rmApplied add-cube-cbrt11.1
Applied *-un-lft-identity11.1
Applied times-frac11.1
Applied associate-*r*8.1
Simplified8.1
rmApplied pow18.1
Applied pow18.1
Applied pow-prod-down8.1
Simplified7.1
if -7.6248532132196434e-277 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 3.30555510696934e-305Initial program 59.1
Simplified59.7
Taylor expanded around inf 16.9
Simplified17.0
Final simplification8.0
herbie shell --seed 2020180
(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))))