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 -1.2635250176906057 \cdot 10^{-246}:\\
\;\;\;\;x + \left(y - z\right) \cdot \left(\left(t - x\right) \cdot \frac{1}{a - z}\right)\\
\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 + \frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{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)))) -1.2635250176906057e-246)
(+ x (* (- y z) (* (- t x) (/ 1.0 (- a z)))))
(if (<= (+ x (* (- y z) (/ (- t x) (- a z)))) 0.0)
(+ t (* y (- (/ x z) (/ t z))))
(+
x
(*
(/
(/ (- y z) (* (cbrt (- a z)) (cbrt (- a z))))
(* (cbrt (cbrt (- a z))) (cbrt (cbrt (- a z)))))
(/ (- t x) (cbrt (cbrt (- 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)))) <= -1.2635250176906057e-246) {
tmp = x + ((y - z) * ((t - x) * (1.0 / (a - z))));
} else if ((x + ((y - z) * ((t - x) / (a - z)))) <= 0.0) {
tmp = t + (y * ((x / z) - (t / z)));
} else {
tmp = x + ((((y - z) / (cbrt(a - z) * cbrt(a - z))) / (cbrt(cbrt(a - z)) * cbrt(cbrt(a - z)))) * ((t - x) / cbrt(cbrt(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)))) < -1.263525017690606e-246Initial program 6.6
rmApplied div-inv_binary646.7
if -1.263525017690606e-246 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 59.3
Taylor expanded around inf 27.6
Simplified23.4
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 7.5
rmApplied add-cube-cbrt_binary648.1
Applied *-un-lft-identity_binary648.1
Applied times-frac_binary648.1
Applied associate-*r*_binary645.4
Simplified5.4
rmApplied add-cube-cbrt_binary645.6
Applied *-un-lft-identity_binary645.6
Applied times-frac_binary645.6
Applied associate-*r*_binary645.1
Simplified5.1
Final simplification8.5
herbie shell --seed 2020224
(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)))))