import math


def tolerance(n_samples):
    """
    Computes a tolerance value based on a number of samples for testing
    pseudo-random functions.
    """
    return 1.2 / (10 ** (math.log10(n_samples) - 3))