1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Simplify the estLog() routine.

FossilOrigin-Name: 6c68d758bce3752f044752404a76bf3ba3eec48f
This commit is contained in:
drh
2014-06-12 15:46:46 +00:00
parent 77ae7ca643
commit 696964d0e5
3 changed files with 8 additions and 9 deletions

View File

@@ -1494,8 +1494,7 @@ static int isDistinctRedundant(
** Estimate the logarithm of the input value to base 2.
*/
static LogEst estLog(LogEst N){
LogEst x = N<0 ? 1 : sqlite3LogEst(N);
return x>33 ? x - 33 : 0;
return N<=10 ? 0 : sqlite3LogEst(N) - 33;
}
/*