http://www.perlmonks.org?node_id=406924


in reply to Finding the max()/min()

Here's an interesting one that doesn involve a comparison operator (even an obfuscated one):
($x + $y + abs($x - $y)) / 2
The math behind that is: take the average of the two numbers, and then add half their difference (start half-way between, and then go up by half). So: (x+y)/2 + abs(x-y)/2, and then factor out the division by two.
------------ :Wq Not an editor command: Wq