In http://mathoverflow.net/questions/35191/a-differentiable-approximation-to-the-minimum-function/35193#35193, a differentiable approximation of the minimum function is given, but it seems it only works for positive reals.
Is there an easy-to-implement approximation to the minimum function $f: \mathbf{R^N} \rightarrow \mathbf{R}$ that behaves correctly over all $\mathbf{R^N}$, even when two elements of the input vector are equal?

