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:
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user