Changed definition of "distance" from bytes to floats and doubles in two
separate routines.