import math


def absolute_error(y, yhat):
    """Returns the maximal absolute error between y and yhat.

    :param y: true function values
    :param yhat: predicted function values

    Lower is better.

    >>> absolute_error([0,1,2,3], [0,0,1,1])
    2.0

    """
    return float(max(map(lambda x, y: math.fabs(x-y), y, yhat)))