x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \le -2.0837690743295162 \cdot 10^{-147} \lor \neg \left(a \le 2.02816420376799779 \cdot 10^{-199}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t - \frac{t \cdot y}{z}\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 VAR;
if (((a <= -2.0837690743295162e-147) || !(a <= 2.0281642037679978e-199))) {
VAR = fma(((y - z) / (a - z)), (t - x), x);
} else {
VAR = fma((x / z), y, (t - ((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.8 |
|---|---|
| Target | 11.8 |
| Herbie | 10.0 |
if a < -2.0837690743295162e-147 or 2.0281642037679978e-199 < a Initial program 23.6
Simplified9.5
if -2.0837690743295162e-147 < a < 2.0281642037679978e-199Initial program 29.7
Simplified21.4
rmApplied div-inv21.4
Taylor expanded around inf 11.5
Simplified12.2
Final simplification10.0
herbie shell --seed 2020078 +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))))