Control: reassign -1 htslib 1.4-1 Control: tags -1 + patch Control: affects -1 bcftools
It seems this code appeared in htslib 1.4, but was only tested in bcftools 1.5.
Description: Fix calculation of PLs on ARM and POWER Bug: https://github.com/samtools/bcftools/issues/702 Bug-Debian: https://bugs.debian.org/877670 Forwarded: https://github.com/samtools/htslib/pull/617 Author: Graham Inggs <gin...@debian.org> Last-Update: 2017-11-08 --- a/errmod.c +++ b/errmod.c @@ -82,10 +82,11 @@ double le1 = log(1.0 - e); for (n = 1; n <= 255; ++n) { double *beta = em->beta + (q<<16|n<<8); - sum1 = sum = 0.0; - for (k = n; k >= 0; --k, sum1 = sum) { - sum = sum1 + expl(lC[n<<8|k] + k*le + (n-k)*le1); - beta[k] = -10. / M_LN10 * logl(sum1 / sum); + sum1 = lC[n<<8|n] + n*le; + beta[n] = INFINITY; + for (k = n - 1; k >= 0; --k, sum1 = sum) { + sum = sum1 + log1pl(expl(lC[n<<8|k] + k*le + (n-k)*le1 - sum1)); + beta[k] = -10. / M_LN10 * (sum1 - sum); } } }