\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;y \leq -1.030146493336082 \cdot 10^{-190} \lor \neg \left(y \leq 1.89196712684249 \cdot 10^{-129}\right):\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \left(t \cdot \frac{\sqrt[3]{x - y}}{z - y}\right)\\
\end{array}(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.030146493336082e-190) (not (<= y 1.89196712684249e-129))) (* (/ (- x y) (- z y)) t) (* (* (cbrt (- x y)) (cbrt (- x y))) (* t (/ (cbrt (- x y)) (- z y))))))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.030146493336082e-190) || !(y <= 1.89196712684249e-129)) {
tmp = ((x - y) / (z - y)) * t;
} else {
tmp = (cbrt(x - y) * cbrt(x - y)) * (t * (cbrt(x - y) / (z - y)));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.2 |
| Herbie | 1.8 |
if y < -1.030146493336082e-190 or 1.89196712684249e-129 < y Initial program 1.0
if -1.030146493336082e-190 < y < 1.89196712684249e-129Initial program 6.3
rmApplied *-un-lft-identity_binary646.3
Applied add-cube-cbrt_binary647.1
Applied times-frac_binary647.1
Applied associate-*l*_binary644.7
Simplified4.7
Final simplification1.8
herbie shell --seed 2020224
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))