chebyshev function

Chebyshev distance (lowlevel function)