\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;x \leq -6.876263184564786 \cdot 10^{+71} \lor \neg \left(x \leq 1.0215699845099448 \cdot 10^{-138}\right):\\
\;\;\;\;t + \frac{x}{\frac{y}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot \left(z - t\right)}{y}\\
\end{array}(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
(FPCore (x y z t) :precision binary64 (if (or (<= x -6.876263184564786e+71) (not (<= x 1.0215699845099448e-138))) (+ t (/ x (/ y (- z t)))) (+ t (/ (* x (- z t)) y))))
double code(double x, double y, double z, double t) {
return ((double) (((double) ((x / y) * ((double) (z - t)))) + t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((x <= -6.876263184564786e+71) || !(x <= 1.0215699845099448e-138))) {
VAR = ((double) (t + (x / (y / ((double) (z - t))))));
} else {
VAR = ((double) (t + (((double) (x * ((double) (z - t)))) / y)));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.3 |
| Herbie | 2.0 |
if x < -6.8762631845647861e71 or 1.0215699845099448e-138 < x Initial program 3.3
rmApplied associate-*l/12.8
rmApplied associate-/l*2.7
if -6.8762631845647861e71 < x < 1.0215699845099448e-138Initial program 1.0
rmApplied associate-*l/1.4
Final simplification2.0
herbie shell --seed 2020198
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))