Let's say I have three numbers $a$, $b$, and $c$. To find the median of these three numbers, you order them from least to greatest, then take the second (middle) number. For example, if the numbers were 6, 5, and 10, I would order them as 5, 6, 10, then take the second number, which is 6.
However... let's say the median is the function $m(a,b,c)$. How do I write this function in terms of elementary functions composed of a, b, and c? (No piecewises allowed).
A similar example: let's say you wanted to write $\min(a,b)$ in terms of elementary functions. One way would be to take the midpoint, then subtract half the distance between the two points. In other words, $\dfrac{a+b}{2}-\dfrac{|a-b|}{2}$.
I can't seem to figure one out for the median though.