x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := x + \left(y - z\right) \cdot t_1\\
\mathbf{if}\;t_2 \leq -2.3944016139848967 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t_1, x\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{x \cdot z}{a - z}\\
t_4 := \frac{z \cdot t}{a - z}\\
\mathbf{if}\;t_2 \leq -2.353607447213978 \cdot 10^{-275}:\\
\;\;\;\;\left(t_3 + \left(x + \frac{y \cdot t}{a - z}\right)\right) - \left(\frac{1}{\frac{a - z}{x \cdot y}} + t_4\right)\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\left(\frac{x \cdot y}{z} + \left(t + \frac{t \cdot a}{z}\right)\right) - \left(\frac{y \cdot t}{z} + \frac{x \cdot a}{z}\right)\\
\mathbf{elif}\;t_2 \leq 1.0267261529479653 \cdot 10^{+100}:\\
\;\;\;\;\left(t_3 + \left(x + t \cdot \frac{y}{a - z}\right)\right) - \left(t_4 + \frac{x \cdot y}{a - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\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
(let* ((t_1 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
(if (<= t_2 -2.3944016139848967e-61)
(fma (- y z) t_1 x)
(let* ((t_3 (/ (* x z) (- a z))) (t_4 (/ (* z t) (- a z))))
(if (<= t_2 -2.353607447213978e-275)
(-
(+ t_3 (+ x (/ (* y t) (- a z))))
(+ (/ 1.0 (/ (- a z) (* x y))) t_4))
(if (<= t_2 0.0)
(-
(+ (/ (* x y) z) (+ t (/ (* t a) z)))
(+ (/ (* y t) z) (/ (* x a) z)))
(if (<= t_2 1.0267261529479653e+100)
(- (+ t_3 (+ x (* t (/ y (- a z))))) (+ t_4 (/ (* x y) (- a z))))
t_2)))))))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 t_1 = (t - x) / (a - z);
double t_2 = x + ((y - z) * t_1);
double tmp;
if (t_2 <= -2.3944016139848967e-61) {
tmp = fma((y - z), t_1, x);
} else {
double t_3 = (x * z) / (a - z);
double t_4 = (z * t) / (a - z);
double tmp_1;
if (t_2 <= -2.353607447213978e-275) {
tmp_1 = (t_3 + (x + ((y * t) / (a - z)))) - ((1.0 / ((a - z) / (x * y))) + t_4);
} else if (t_2 <= 0.0) {
tmp_1 = (((x * y) / z) + (t + ((t * a) / z))) - (((y * t) / z) + ((x * a) / z));
} else if (t_2 <= 1.0267261529479653e+100) {
tmp_1 = (t_3 + (x + (t * (y / (a - z))))) - (t_4 + ((x * y) / (a - z)));
} else {
tmp_1 = t_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t



Bits error versus a
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.39440161398489666e-61Initial program 3.5
Simplified3.5
if -2.39440161398489666e-61 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.3536074472139779e-275Initial program 15.5
Simplified15.5
Taylor expanded in y around 0 2.3
Applied clear-num_binary642.3
if -2.3536074472139779e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 60.5
Simplified60.1
Taylor expanded in z around inf 11.3
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.02672615294796529e100Initial program 9.1
Simplified9.1
Taylor expanded in y around 0 4.9
Applied associate-/l*_binary644.8
Applied associate-/r/_binary644.1
if 1.02672615294796529e100 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 4.4
Final simplification4.7
herbie shell --seed 2022088
(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)))))