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.7882633144150225 \cdot 10^{-279}:\\
\;\;\;\;x + \left(\left(y - z\right) \cdot \frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{a - z}}\\
\mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{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)))) -4.7882633144150225e-279)
(+
x
(*
(*
(- y z)
(/ (* (cbrt (- t x)) (cbrt (- t x))) (* (cbrt (- a z)) (cbrt (- a z)))))
(/ (cbrt (- t x)) (cbrt (- a z)))))
(if (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 0.0)
(+ t (* y (- (/ x z) (/ 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)))) <= -4.7882633144150225e-279) {
tmp = x + (((y - z) * ((cbrt(t - x) * cbrt(t - x)) / (cbrt(a - z) * cbrt(a - z)))) * (cbrt(t - x) / cbrt(a - z)));
} else if ((x + ((y - z) * ((t - x) / (a - z)))) <= 0.0) {
tmp = t + (y * ((x / z) - (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)))) < -4.7882633144150225e-279Initial program 7.4
rmApplied add-cube-cbrt_binary64_35238.1
Applied add-cube-cbrt_binary64_35238.3
Applied times-frac_binary64_34948.3
Applied associate-*r*_binary64_34284.9
if -4.7882633144150225e-279 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 60.3
Taylor expanded around inf 25.8
Simplified21.0
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 7.6
rmApplied add-cube-cbrt_binary64_35238.3
Applied *-un-lft-identity_binary64_34888.3
Applied times-frac_binary64_34948.3
Applied associate-*r*_binary64_34285.1
Simplified5.1
rmApplied pow1_binary64_35495.1
Applied pow1_binary64_35495.1
Applied pow-prod-down_binary64_35595.1
Simplified7.6
rmApplied associate-/r/_binary64_34343.9
Final simplification6.7
herbie shell --seed 2020355
(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)))))