\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \le -2.4618509963497409 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{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 ((x <= -2.461850996349741e-77)) {
VAR = ((double) (((double) (x / z)) * y));
} else {
VAR = ((double) (x * ((double) (y / z))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.8 |
|---|---|
| Target | 6.1 |
| Herbie | 5.9 |
if x < -2.461850996349741e-77Initial program 6.1
rmApplied *-un-lft-identity6.1
Applied associate-*r*6.1
Applied associate-/l*6.3
rmApplied div-inv6.3
Applied times-frac6.0
Simplified5.9
if -2.461850996349741e-77 < x Initial program 5.7
rmApplied *-un-lft-identity5.7
Applied times-frac5.8
Simplified5.8
Final simplification5.9
herbie shell --seed 2020114
(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))