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 -2.4909642387543203 \cdot 10^{-274}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 9.958656639636994 \cdot 10^{-250}:\\
\;\;\;\;\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 + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\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)))) -2.4909642387543203e-274)
(+ x (/ (- t x) (/ (- a z) (- y z))))
(if (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 9.958656639636994e-250)
(- (+ t (+ (/ (* x y) z) (/ (* t a) z))) (+ (/ (* x a) z) (/ (* y t) z)))
(+ x (* (- t x) (/ (- y z) (- a 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)))) <= -2.4909642387543203e-274) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if ((x + ((y - z) * ((t - x) / (a - z)))) <= 9.958656639636994e-250) {
tmp = (t + (((x * y) / z) + ((t * a) / z))) - (((x * a) / z) + ((y * t) / z));
} else {
tmp = x + ((t - x) * ((y - z) / (a - 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)))) < -2.4909642387543203e-274Initial program 6.8
rmApplied associate-*r/_binary6419.4
Simplified19.4
rmApplied associate-/l*_binary644.2
if -2.4909642387543203e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9586566396369937e-250Initial program 58.9
Taylor expanded around inf 14.1
Simplified14.1
if 9.9586566396369937e-250 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 5.9
rmApplied div-inv_binary646.0
Applied associate-*r*_binary6419.8
Simplified19.8
rmApplied associate-*l*_binary643.9
Simplified3.8
Final simplification5.6
herbie shell --seed 2021118
(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)))))