\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;t \le -6.6471854367587137 \cdot 10^{-174} \lor \neg \left(t \le 1.07244263161839214 \cdot 10^{-243}\right):\\
\;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((t <= -6.647185436758714e-174) || !(t <= 1.0724426316183921e-243))) {
VAR = ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
} else {
VAR = ((double) (((double) (x * ((double) (((double) (z - t)) / y)))) + t));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.3 |
| Herbie | 2.0 |
if t < -6.6471854367587137e-174 or 1.07244263161839214e-243 < t Initial program 1.5
if -6.6471854367587137e-174 < t < 1.07244263161839214e-243Initial program 5.6
rmApplied div-inv5.6
Applied associate-*l*4.7
Simplified4.6
Final simplification2.0
herbie shell --seed 2020175
(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))