X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=NoiseProfile.h;h=5662e0b216b473f3f3cea0440457c5b97d2e4fd2;hp=c8d21073b3c21e7ded8b50b04f01da458f5b8ab6;hb=83ce658a4b9c5f04c081316314b66b94ad5ffbde;hpb=7b8405a9fe481d041d7e50d1d8abb4b589bdc0d3 diff --git a/NoiseProfile.h b/NoiseProfile.h index c8d2107..5662e0b 100644 --- a/NoiseProfile.h +++ b/NoiseProfile.h @@ -81,7 +81,7 @@ void NoiseProfile::finish() { logp = 0.0; sum = 0.0; for (int i = 0; i < NCODES; i++) sum += (p[i] + c[i]); - if (sum <= 0.0) return; + if (sum <= EPSILON) return; for (int i = 0; i < NCODES; i++) { p[i] = (p[i] + c[i]) / sum; if (c[i] > 0.0) { logp += c[i] * log(p[i]); }