x + \left(y - z\right) \cdot \frac{t - x}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -8.7908458686707122 \cdot 10^{144}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\
\mathbf{elif}\;z \le -4.0528384344896528 \cdot 10^{-143}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \left(t - x\right) \cdot \frac{1}{a - z}, x\right)\\
\mathbf{elif}\;z \le -2.42842816428938809 \cdot 10^{-304}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{elif}\;z \le 3.64013298540895573 \cdot 10^{143}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{1}{\frac{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 VAR;
if ((z <= -8.790845868670712e+144)) {
VAR = fma(y, ((x / z) - (t / z)), t);
} else {
double VAR_1;
if ((z <= -4.052838434489653e-143)) {
VAR_1 = fma((y - z), ((t - x) * (1.0 / (a - z))), x);
} else {
double VAR_2;
if ((z <= -2.428428164289388e-304)) {
VAR_2 = (x + (((y - z) * (t - x)) / (a - z)));
} else {
double VAR_3;
if ((z <= 3.6401329854089557e+143)) {
VAR_3 = fma((y - z), (1.0 / ((a - z) / (t - x))), x);
} else {
VAR_3 = fma(y, ((x / z) - (t / z)), t);
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t



Bits error versus a
Results
if z < -8.790845868670712e+144 or 3.6401329854089557e+143 < z Initial program 28.0
Simplified27.9
Taylor expanded around inf 25.7
Simplified16.9
if -8.790845868670712e+144 < z < -4.052838434489653e-143Initial program 10.9
Simplified10.9
rmApplied div-inv10.9
if -4.052838434489653e-143 < z < -2.428428164289388e-304Initial program 7.2
rmApplied associate-*r/6.5
if -2.428428164289388e-304 < z < 3.6401329854089557e+143Initial program 9.1
Simplified9.1
rmApplied clear-num9.2
Final simplification11.7
herbie shell --seed 2020105 +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)))))