\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -7.8881174390901516 \cdot 10^{199} \lor \neg \left(x \cdot y \le -2.3497345708503815 \cdot 10^{-251} \lor \neg \left(x \cdot y \le 5.8818851674656702 \cdot 10^{-229}\right)\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}double code(double x, double y, double z) {
return ((double) (((double) (x * y)) / z));
}
double code(double x, double y, double z) {
double VAR;
if (((((double) (x * y)) <= -7.888117439090152e+199) || !((((double) (x * y)) <= -2.3497345708503815e-251) || !(((double) (x * y)) <= 5.88188516746567e-229)))) {
VAR = ((double) (x * ((double) (y / z))));
} else {
VAR = ((double) (((double) (x * y)) / z));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 6.2 |
| Herbie | 1.7 |
if (* x y) < -7.8881174390901516e199 or -2.3497345708503815e-251 < (* x y) < 5.8818851674656702e-229Initial program 15.9
rmApplied *-un-lft-identity15.9
Applied times-frac0.4
Simplified0.4
if -7.8881174390901516e199 < (* x y) < -2.3497345708503815e-251 or 5.8818851674656702e-229 < (* x y) Initial program 2.2
Final simplification1.7
herbie shell --seed 2020175
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))