fix corner case in evaluate (#4138)

fixes #4137
This commit is contained in:
Alex Lam S.L
2020-09-21 23:49:32 +01:00
committed by GitHub
parent 8fa470c17c
commit 13cdc167a2
3 changed files with 264 additions and 203 deletions

View File

@@ -95,7 +95,7 @@ asm_mixed: {
return +sum;
}
function geometricMean(start, end) {
return start |= 0, end |= 0, +exp(logSum(start, end) / (end - start | 0));
return start |= 0, end |= 0, +exp(+logSum(start, end) / (end - start | 0));
}
var exp = stdlib.Math.exp, log = stdlib.Math.log, values = new stdlib.Float64Array(buffer);
return { geometricMean: geometricMean };