x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le -2.73622139892582785 \cdot 10^{-281} \lor \neg \left(x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \le 0.0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x \cdot y}{z} + t\right) - \frac{t \cdot y}{z}\\
\end{array}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)))))) <= -2.736221398925828e-281) || !(((double) (x + ((double) (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))))) <= 0.0))) {
VAR = ((double) (x + ((double) (((double) (t - x)) * ((double) (((double) (y - z)) / ((double) (a - z))))))));
} else {
VAR = ((double) (((double) (((double) (((double) (x * y)) / z)) + t)) - ((double) (((double) (t * y)) / 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.7 |
|---|---|
| Target | 12.0 |
| Herbie | 8.5 |
if (+ x (/ (* (- y z) (- t x)) (- a z))) < -2.736221398925828e-281 or 0.0 < (+ x (/ (* (- y z) (- t x)) (- a z))) Initial program 21.5
rmApplied *-un-lft-identity21.5
Applied *-commutative21.5
Applied times-frac7.5
Simplified7.5
if -2.736221398925828e-281 < (+ x (/ (* (- y z) (- t x)) (- a z))) < 0.0Initial program 59.1
Taylor expanded around inf 19.1
Final simplification8.5
herbie shell --seed 2020114
(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))))