At the beginning of the "k"th iteration, the variable "b" holds the latest remainder "r""k"−1, whereas the variable "a" holds its predecessor, "r""k"−2. The step "b" := "a" mod "b" is equivalent to the above recursion formula "r""k" ≡ "r""k"−2 mod "r""k"−1. The temporary variable "t" holds the value of "r""k"−1 while the next remainder "r""k" is being calculated. At the end of the loop iteration, the variable "b" holds the remainder "r""k", whereas the variable "a" holds its predecessor, "r""k"−1.