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 -6.336278483289018 \cdot 10^{-295} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z} - \frac{z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{\frac{z}{x}} \cdot \frac{a}{z} + \left(t + \left(\frac{y}{\frac{z}{x}} + \frac{t}{\frac{z}{a}}\right)\right)\right) - \left(x \cdot \frac{a}{z} + \left(y \cdot \frac{t}{z} + \frac{a}{z} \cdot \left(y \cdot \frac{t}{z}\right)\right)\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)))) -6.336278483289018e-295)
(not (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 0.0)))
(+ x (/ (- t x) (- (/ a (- y z)) (/ z (- y z)))))
(-
(+ (* (/ y (/ z x)) (/ a z)) (+ t (+ (/ y (/ z x)) (/ t (/ z a)))))
(+ (* x (/ a z)) (+ (* y (/ t z)) (* (/ a z) (* y (/ t z))))))))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)))) <= -6.336278483289018e-295) || !((x + ((y - z) * ((t - x) / (a - z)))) <= 0.0)) {
tmp = x + ((t - x) / ((a / (y - z)) - (z / (y - z))));
} else {
tmp = (((y / (z / x)) * (a / z)) + (t + ((y / (z / x)) + (t / (z / a))))) - ((x * (a / z)) + ((y * (t / z)) + ((a / z) * (y * (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)))) < -6.3362784832890179e-295 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 7.7
Simplified4.4
Taylor expanded around 0 4.4
if -6.3362784832890179e-295 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 61.4
Simplified60.9
Taylor expanded around 0 12.2
Simplified1.5
Final simplification4.0
herbie shell --seed 2021176
(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)))))