x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \left(\frac{x \cdot z}{a - z} + \left(x + \frac{y \cdot t}{a - z}\right)\right) - \left(\frac{x \cdot y}{a - z} + \frac{z \cdot t}{a - z}\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -7.228751941855603 \cdot 10^{-255}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z} - \frac{x}{a - z}, x\right)\\
\mathbf{elif}\;t_1 \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_1 \leq 3.379126430287508 \cdot 10^{-42}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\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 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2
(-
(+ (/ (* x z) (- a z)) (+ x (/ (* y t) (- a z))))
(+ (/ (* x y) (- a z)) (/ (* z t) (- a z))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -7.228751941855603e-255)
(fma (- y z) (- (/ t (- a z)) (/ x (- a z))) x)
(if (<= t_1 0.0)
(-
(+ (/ (* x y) z) (+ t (/ (* t a) z)))
(+ (/ (* y t) z) (/ (* x a) z)))
(if (<= t_1 3.379126430287508e-42) t_2 t_1))))))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 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = (((x * z) / (a - z)) + (x + ((y * t) / (a - z)))) - (((x * y) / (a - z)) + ((z * t) / (a - z)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -7.228751941855603e-255) {
tmp = fma((y - z), ((t / (a - z)) - (x / (a - z))), x);
} else if (t_1 <= 0.0) {
tmp = (((x * y) / z) + (t + ((t * a) / z))) - (((y * t) / z) + ((x * a) / z));
} else if (t_1 <= 3.379126430287508e-42) {
tmp = t_2;
} else {
tmp = t_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)))) < -inf.0 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.37912643028750797e-42Initial program 22.5
Simplified22.5
Taylor expanded in y around 0 3.1
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -7.22875194185560306e-255Initial program 4.5
Simplified4.5
Taylor expanded in t around 0 4.5
if -7.22875194185560306e-255 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 59.8
Simplified59.4
Taylor expanded in z around inf 12.3
if 3.37912643028750797e-42 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 5.7
Simplified5.7
Applied div-inv_binary645.8
Applied fma-udef_binary645.8
Simplified5.7
Final simplification5.9
herbie shell --seed 2022077
(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)))))