def f(x, y):
    """
    Function that will be optimized

    Parameters
    ----------
    x : float
        Value for parameter x.
    y : float
        Value for parameter x.

    Returns
    -------
    float
        Function value for f(x,y).
    """
    
    if (x**2 + y**2) <= 2:
        return (1-x)**2 + 100*((y - x**2)**2)
        
    else:
        return 10**8