Compute the absolute distance between two values.
This function can be overloaded in the tts namespace to compute the distance for external types.