If check = TRUE the function checks whether all values in the two numeric
input vectors are distinct. If so, it returns the original values, otherwise
the ties are removed by adding noise from a continuous uniform distribution
to all observations. If check = FALSE, it simply determines the number
of digits and adds uniform noise.
More precisely, we determine the minimum number of digits d_min in the sample
and then add random numbers from the U[-0.5 10^(-d_min), 0.5 10^(-d_min)]
distribution to each of the observations.