\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;t \le -2.0876292205169267 \cdot 10^{-89} \lor \neg \left(t \le 2.60782739113596551 \cdot 10^{-194}\right):\\
\;\;\;\;t + \frac{x}{y} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot \left(z - t\right)}{y}\\
\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 <= -2.0876292205169267e-89) || !(t <= 2.6078273911359655e-194))) {
VAR = ((double) (t + ((double) (((double) (x / y)) * ((double) (z - t))))));
} else {
VAR = ((double) (t + ((double) (((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.4 |
|---|---|
| Target | 2.5 |
| Herbie | 2.2 |
if t < -2.0876292205169267e-89 or 2.60782739113596551e-194 < t Initial program 1.1
if -2.0876292205169267e-89 < t < 2.60782739113596551e-194Initial program 5.4
rmApplied associate-*l/4.8
Final simplification2.2
herbie shell --seed 2020179
(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))