\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;t \le -7.6537366595487337 \cdot 10^{-284} \lor \neg \left(t \le 5.63678529066163735 \cdot 10^{-158}\right):\\
\;\;\;\;t + \frac{x}{y} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(x \cdot \frac{z}{y} - x \cdot \frac{t}{y}\right)\\
\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 <= -7.653736659548734e-284) || !(t <= 5.636785290661637e-158))) {
VAR = ((double) (t + ((double) (((double) (x / y)) * ((double) (z - t))))));
} else {
VAR = ((double) (t + ((double) (((double) (x * ((double) (z / y)))) - ((double) (x * ((double) (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.1 |
| Herbie | 1.9 |
if t < -7.6537366595487337e-284 or 5.63678529066163735e-158 < t Initial program 1.3
if -7.6537366595487337e-284 < t < 5.63678529066163735e-158Initial program 5.2
rmApplied sub-neg5.2
Applied distribute-lft-in5.2
Simplified7.6
Simplified5.1
Final simplification1.9
herbie shell --seed 2020184
(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))