Skip to content

Commit 8e65164

Browse files
committed
Consider n “large” if greater than 1000
1 parent dd345d7 commit 8e65164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/entropy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const _totalOf = (numStrings, log2Risk) => {
99
if (numStrings == 0) { return 0 }
1010

1111
let N
12-
if (numStrings < 10001) {
12+
if (numStrings < 1000) {
1313
N = _log2(numStrings) + _log2(numStrings-1)
1414
}
1515
else {
@@ -30,7 +30,7 @@ const bitsWithRiskPower = (total, rPower) => {
3030

3131
const bitsWithPowers = (tPower, rPower) => {
3232
let N = 0
33-
if (tPower < 5) {
33+
if (tPower < 4) {
3434
return bitsWithRiskPower(Math.pow(10, tPower), rPower)
3535
}
3636
else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy