x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -3.62818059942686653 \cdot 10^{235}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{1}{a - t} \cdot \left(z - t\right), x\right)\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + (((y - x) * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((t <= -3.6281805994268665e+235)) {
VAR = y;
} else {
VAR = fma((y - x), ((1.0 / (a - t)) * (z - t)), 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.4 |
|---|---|
| Target | 9.4 |
| Herbie | 11.6 |
if t < -3.6281805994268665e+235Initial program 52.6
Simplified30.8
Taylor expanded around 0 21.8
if -3.6281805994268665e+235 < t Initial program 22.4
Simplified13.5
rmApplied fma-udef13.5
rmApplied div-inv13.5
Applied associate-*l*10.9
Applied fma-def10.9
Final simplification11.6
herbie shell --seed 2020071 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))