x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -6.82839180853208555 \cdot 10^{-234} \lor \neg \left(a \le 3.8796318964657166 \cdot 10^{-175}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\
\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 temp;
if (((a <= -6.828391808532086e-234) || !(a <= 3.8796318964657166e-175))) {
temp = fma(((y - z) * (1.0 / (a - z))), (t - x), x);
} else {
temp = fma(y, ((x / z) - (t / z)), t);
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 23.7 |
|---|---|
| Target | 11.9 |
| Herbie | 10.1 |
if a < -6.828391808532086e-234 or 3.8796318964657166e-175 < a Initial program 22.6
Simplified10.0
rmApplied div-inv10.0
if -6.828391808532086e-234 < a < 3.8796318964657166e-175Initial program 30.0
Simplified21.9
Taylor expanded around inf 11.0
Simplified10.2
Final simplification10.1
herbie shell --seed 2020066 +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))))