def pick_best_solution(xys):
    """
    Return the value of x where abs(y) is at its minimum and xys is a list of
    x-y pairs.
    
    Examples
    --------
    >>> pick_best_solution([(0.1, 0.3), (0.2, -1.), (-0.5, 0.001)])
    -0.5
    
    """
    y_best = 1e16
    x_best = 0.
    abs_ = abs
    for x, y in xys:
        y = abs_(y)
        if y < y_best:
            y_best = y
            x_best = x
    return x_best