We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4345ba4 commit d506c8aCopy full SHA for d506c8a
1 file changed
factory/ideas.php
@@ -134,8 +134,9 @@ protected function query_sort($sort, $direction)
134
else
135
{
136
// https://www.evanmiller.org/how-not-to-sort-by-average-rating.html
137
+ // switched SQRT(x) to POWER(x, 0.5) for SQLITE3 support
138
$this->sql['SELECT'][] = '((i.idea_votes_up + 1.9208) / (i.idea_votes_up + i.idea_votes_down) -
- 1.96 * SQRT((i.idea_votes_up * i.idea_votes_down) / (i.idea_votes_up + i.idea_votes_down) + 0.9604) /
139
+ 1.96 * POWER((i.idea_votes_up * i.idea_votes_down) / (i.idea_votes_up + i.idea_votes_down) + 0.9604, 0.5) /
140
(i.idea_votes_up + i.idea_votes_down)) / (1 + 3.8416 / (i.idea_votes_up + i.idea_votes_down))
141
AS ci_lower_bound';
142
0 commit comments