x + \left(y - z\right) \cdot \frac{t - x}{a - z}\begin{array}{l}
\mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -2.8377217397670284 \cdot 10^{-276} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
(FPCore (x y z t a)
:precision binary64
(if (or (<= (+ x (* (- y z) (/ (- t x) (- a z)))) -2.8377217397670284e-276)
(not (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 0.0)))
(+ x (* (- y z) (/ (- t x) (- a z))))
(+ t (* y (- (/ x z) (/ t z))))))double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y - z)) * (((double) (t - x)) / ((double) (a - z)))))));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((((double) (x + ((double) (((double) (y - z)) * (((double) (t - x)) / ((double) (a - z))))))) <= -2.8377217397670284e-276) || !(((double) (x + ((double) (((double) (y - z)) * (((double) (t - x)) / ((double) (a - z))))))) <= 0.0))) {
tmp = ((double) (x + ((double) (((double) (y - z)) * (((double) (t - x)) / ((double) (a - z)))))));
} else {
tmp = ((double) (t + ((double) (y * ((double) ((x / z) - (t / z)))))));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t



Bits error versus a
Results
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.83772173976702841e-276 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 7.5
if -2.83772173976702841e-276 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 60.3
Taylor expanded around inf 25.9
Simplified19.9
Final simplification9.1
herbie shell --seed 2020210
(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)))))