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

Here's an interesting one that doesn involve a comparison operator (even an obfuscated one):

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.($x + $y + abs($x - $y)) / 2

------------ :Wq Not an editor command: Wq

In Section
Meditations