manhattan function

Manhattan distance (lowlevel function)