Calculates g , s , and t , such that a*s + b*t = g = gcd( a,b ) , where gcd is gretest common divisor . Returns array with respective elements g , s and t .