'Controversial' Ordering This is seemingly simple question that naturally fell into the ambit of my attention recently. And it's oddly reflexively referential in a certain way also.
On a certain webforum that I frequent (not this one - a far far less 'respectable' one than this one ... but not 4chan, I hasten to add! (in fact 4chan doesn't have any votes - there wouldn't be any point, as everyone's score would just go to $-\infty$ within a few minutes!)), there are several options for listing the posts: there is one that does it by nett voting-score; a chronological one (these are pretty obvious ones to have): but there is another one designated 'controversial'. I wrote to the moderator asking what this ordering means, and he replied saying that it's puts a premium on a post according as it has a large number of both upvotes and downvotes. My instantaneous thought was "that's simple enough" ... but then I went on to think ... "but exactly what formula would you use?".
I have decided eventually that, if I were writing the code for the forum, I would use $$\sqrt{m^2+n^2}\operatorname{atn}\frac{2mn}{|m^2-n^2|} ,$$ with $m$ & $n$ being the vote-numbers - whichever-whichever. (It begs normalisation by a $2/\pi$ ... but that doesn't matter if it's just for the sake of comparison.) The reasoning is that this recipe is proportional to the magnitude of the vote 'vector', but scaled by the angle by which it departs from either comprising purely upvotes or purely downvotes. It looks ridiculously complicated for such a simple thing ... but then it's all on computer: & what is calculating that compared to image-processing, & stuff like that.
And I wonder whether anyone could either suggest something else, or tell me what coders of web-fora actually use. 
 A: I don't know what coders of web fora actually use, but I'd say the simplest formula would be to just use the product of up- and downvotes, or if linear scaling with the total number of votes is considered important, the geometric mean (that is, the square root of the product).
This is because for a given sum (that is, a given total number of votes), the product is maximal when the number of up- and downvotes are equal, and falls down to zero when one of them goes to zero (a post that has all its vote in one direction clearly is not controversial at all).
Moreover, the product has the advantage that it is simple, which means less chance of implementation bugs, and fast, which means you won't have it as performance bottleneck even for large numbers of posts.
If you want your rating not purely on how controversial it is, you can also use something like
$$m-n + c\sqrt{mn}$$
where $c$ tells how much being controversial should be weighted; c=0 would be ordering purely after score (that is, number of positive minus number of negative votes, like e.g. here on Stack Exchange), a large value for $c$ would mean that being highly controversial is the main sorting criterion.
