x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -3.2165983826730228 \cdot 10^{246} \lor \neg \left(z \le 9.10019436889470365 \cdot 10^{191}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t - x}{\frac{a - z}{y - z}} + x\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + (((y - z) * (t - x)) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((z <= -3.216598382673023e+246) || !(z <= 9.100194368894704e+191))) {
VAR = fma(y, ((x / z) - (t / z)), t);
} else {
VAR = (((t - x) / ((a - z) / (y - z))) + x);
}
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 | 11.5 |
| Herbie | 10.0 |
if z < -3.216598382673023e+246 or 9.100194368894704e+191 < z Initial program 50.3
Simplified25.8
Taylor expanded around inf 23.5
Simplified13.6
if -3.216598382673023e+246 < z < 9.100194368894704e+191Initial program 19.6
Simplified9.3
rmApplied clear-num9.4
rmApplied fma-udef9.4
Simplified9.3
Final simplification10.0
herbie shell --seed 2020100 +o rules:numerics
(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))))