\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;x \le -1.062950925833645 \cdot 10^{105}:\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \left(z - t\right) + 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 ((x <= -1.062950925833645e+105)) {
VAR = ((double) (((double) (x * ((double) (((double) (z - t)) / y)))) + t));
} else {
VAR = ((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t));
}
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.8 |
if x < -1.062950925833645e105Initial program 4.4
rmApplied div-inv4.5
Applied associate-*l*2.6
Simplified2.5
if -1.062950925833645e105 < x Initial program 1.7
Final simplification1.8
herbie shell --seed 2020152
(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))