import math


def schwefel(ind):
    """Schwefel function defined as:
    $$ f(x) = 418.9829n - \sum_{i=1}^{n} x_i \sin(\sqrt(\norm(x_i))) $
    with a search domain of $-500 < x_i < 500, 1 \leq i \leq n$.
    The global minimum is at $f(x_1, ..., x_n) = f(420.9687, ..., 420.9687) = 0.
    """
    return 418.9829 * float(len(ind)) - sum((x * math.sin(math.sqrt(abs(x))) for x in ind)),