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 -\infty:\\
\;\;\;\;x + \left(\left(\frac{y \cdot t}{a - z} + \frac{x \cdot z}{a - z}\right) - \left(\frac{x \cdot y}{a - z} + \frac{z \cdot t}{a - z}\right)\right)\\
\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -2.107537073467051 \cdot 10^{-159}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -5.564850423439244 \cdot 10^{-293}:\\
\;\;\;\;\left(\frac{y \cdot t}{a - z} + \left(x + \frac{x \cdot z}{a - z}\right)\right) - \left(\frac{x \cdot y}{a - z} + \frac{z \cdot t}{a - z}\right)\\
\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\
\;\;\;\;\left(t + \left(\frac{x \cdot y}{z} + \frac{t \cdot a}{z}\right)\right) - \left(\frac{x \cdot a}{z} + \frac{y \cdot t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y - z}{a - z}}{\frac{1}{t - x}}\\
\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 (<= (+ x (* (- y z) (/ (- t x) (- a z)))) (- INFINITY))
(+
x
(-
(+ (/ (* y t) (- a z)) (/ (* x z) (- a z)))
(+ (/ (* x y) (- a z)) (/ (* z t) (- a z)))))
(if (<= (+ x (* (- y z) (/ (- t x) (- a z)))) -2.107537073467051e-159)
(+ x (* (- y z) (/ (- t x) (- a z))))
(if (<= (+ x (* (- y z) (/ (- t x) (- a z)))) -5.564850423439244e-293)
(-
(+ (/ (* y t) (- a z)) (+ x (/ (* x z) (- a z))))
(+ (/ (* x y) (- a z)) (/ (* z t) (- a z))))
(if (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 0.0)
(-
(+ t (+ (/ (* x y) z) (/ (* t a) z)))
(+ (/ (* x a) z) (/ (* y t) z)))
(+ x (/ (/ (- y z) (- a z)) (/ 1.0 (- t x)))))))))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 tmp;
if ((x + ((y - z) * ((t - x) / (a - z)))) <= -((double) INFINITY)) {
tmp = x + ((((y * t) / (a - z)) + ((x * z) / (a - z))) - (((x * y) / (a - z)) + ((z * t) / (a - z))));
} else if ((x + ((y - z) * ((t - x) / (a - z)))) <= -2.107537073467051e-159) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if ((x + ((y - z) * ((t - x) / (a - z)))) <= -5.564850423439244e-293) {
tmp = (((y * t) / (a - z)) + (x + ((x * z) / (a - z)))) - (((x * y) / (a - z)) + ((z * t) / (a - z)));
} else if ((x + ((y - z) * ((t - x) / (a - z)))) <= 0.0) {
tmp = (t + (((x * y) / z) + ((t * a) / z))) - (((x * a) / z) + ((y * t) / z));
} else {
tmp = x + (((y - z) / (a - z)) / (1.0 / (t - x)));
}
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)))) < -inf.0Initial program 64.0
Taylor expanded around 0 11.4
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.1075370734670509e-159Initial program 3.4
if -2.1075370734670509e-159 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.5648504234392436e-293Initial program 23.3
Taylor expanded around 0 1.7
if -5.5648504234392436e-293 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 61.0
Taylor expanded around inf 12.3
Simplified12.3
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 7.6
rmApplied clear-num_binary64_17827.9
rmApplied div-inv_binary64_17808.0
Applied *-un-lft-identity_binary64_17838.0
Applied times-frac_binary64_17897.7
Applied associate-*r*_binary64_17234.5
Simplified4.4
rmApplied un-div-inv_binary64_17814.4
Final simplification5.1
herbie shell --seed 2021044
(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)))))