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 -4.350618953903703 \cdot 10^{-244} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{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)))) -4.350618953903703e-244)
(not (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(+ t (* y (- (/ x z) (/ 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)))) <= -4.350618953903703e-244) || !((x + ((y - z) * ((t - x) / (a - z)))) <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (y * ((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)))) < -4.350618953903703e-244 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 7.1
rmApplied add-cube-cbrt_binary64_25007.8
Applied *-un-lft-identity_binary64_24657.8
Applied times-frac_binary64_24717.8
Applied associate-*r*_binary64_24055.0
Simplified5.0
rmApplied pow1_binary64_25265.0
Applied pow1_binary64_25265.0
Applied pow-prod-down_binary64_25365.0
Simplified3.9
if -4.350618953903703e-244 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 58.4
Taylor expanded around inf 28.8
Simplified23.1
Final simplification6.6
herbie shell --seed 2020308
(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)))))