x + \left(y - z\right) \cdot \frac{t - x}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -1.8711755082866498 \cdot 10^{149} \lor \neg \left(z \le 2.2746469954276827 \cdot 10^{114}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\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 (((z <= -1.8711755082866498e+149) || !(z <= 2.2746469954276827e+114))) {
temp = fma(y, ((x / z) - (t / z)), t);
} else {
temp = fma((y - z), ((t - x) / (a - z)), x);
}
return temp;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t



Bits error versus a
Results
if z < -1.8711755082866498e+149 or 2.2746469954276827e+114 < z Initial program 28.2
Simplified28.1
Taylor expanded around inf 24.9
Simplified16.8
if -1.8711755082866498e+149 < z < 2.2746469954276827e+114Initial program 9.0
Simplified9.0
rmApplied fma-udef9.0
rmApplied fma-def9.0
Final simplification11.6
herbie shell --seed 2020049 +o rules:numerics
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))