It calculates the GCD of a and b, and two values x and y such that:
        a*x + b*y = GCD(a,b).
        This code has been taken from the project sympy.

        :param a: first integer
        :param b: second integer
        :return: x,y and the GCD of a and b

def extended_euclid(a, b):
        """
        It calculates the GCD of a and b, and two values x and y such that:
        a*x + b*y = GCD(a,b).
        This code has been taken from the project sympy.

        :param a: first integer
        :param b: second integer
        :return: x,y and the GCD of a and b
        """
        if b == 0:
            return (1, 0, a)
        x0, y0, d = StridedInterval.extended_euclid(b, a % b)
        x, y = y0, x0 - (a // b) * y0
        return x, y, d