\frac{x}{y} \cdot \left(z - t\right) + t\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \cdot \left(z - t\right) + t = -\infty:\\
\;\;\;\;{\left(\frac{x}{\frac{y}{z - t}}\right)}^{1} + 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 ((((double) (((double) (((double) (x / y)) * ((double) (z - t)))) + t)) <= -inf.0)) {
VAR = ((double) (((double) pow(((double) (x / ((double) (y / ((double) (z - t)))))), 1.0)) + 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 | 1.9 |
|---|---|
| Target | 2.2 |
| Herbie | 1.2 |
if (+ (* (/ x y) (- z t)) t) < -inf.0Initial program 64.0
rmApplied pow164.0
Applied pow164.0
Applied pow-prod-down64.0
Simplified0.3
rmApplied *-commutative0.3
Applied associate-/l*0.3
if -inf.0 < (+ (* (/ x y) (- z t)) t) Initial program 1.2
Final simplification1.2
herbie shell --seed 2020114 +o rules:numerics
(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))