\frac{x \cdot y}{z}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -7.4631714988571799 \cdot 10^{-140} \lor \neg \left(x \cdot y \le -0.0\right):\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}double f(double x, double y, double z) {
double r676025 = x;
double r676026 = y;
double r676027 = r676025 * r676026;
double r676028 = z;
double r676029 = r676027 / r676028;
return r676029;
}
double f(double x, double y, double z) {
double r676030 = x;
double r676031 = y;
double r676032 = r676030 * r676031;
double r676033 = -7.46317149885718e-140;
bool r676034 = r676032 <= r676033;
double r676035 = -0.0;
bool r676036 = r676032 <= r676035;
double r676037 = !r676036;
bool r676038 = r676034 || r676037;
double r676039 = z;
double r676040 = r676032 / r676039;
double r676041 = r676039 / r676031;
double r676042 = r676030 / r676041;
double r676043 = r676038 ? r676040 : r676042;
return r676043;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 6.4 |
| Herbie | 3.9 |
if (* x y) < -7.46317149885718e-140 or -0.0 < (* x y) Initial program 4.8
if -7.46317149885718e-140 < (* x y) < -0.0Initial program 11.5
rmApplied associate-/l*1.1
Final simplification3.9
herbie shell --seed 2020081 +o rules:numerics
(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))