code: def main(self, x, y, phase):
          
          self.initial_step(phase, x, y)
  
          # pipelined CORDIC
          for i in range(self.ITERATIONS - 1):
              if self.MODE == CordicMode.ROTATION:
                  direction = self.phase[i] > 0
              elif self.MODE == CordicMode.VECTORING:
                  direction = self.y[i] < 0
  
              if direction:
                  self.x[i + 1] = self.x[i] - (self.y[i] >> i)
                  self.y[i + 1] = self.y[i] + (self.x[i] >> i)
                  self.phase[i + 1] = self.phase[i] - self.PHASE_LUT[i]
              else:
                  self.x[i + 1] = self.x[i] + (self.y[i] >> i)
                  self.y[i + 1] = self.y[i] - (self.x[i] >> i)
                  self.phase[i + 1] = self.phase[i] + self.PHASE_LUT[i]
  
          return self.x[-1], self.y[-1], self.phase[-1]
docs: Runs one step of pipelined CORDIC
          Returned phase is in 1 to -1 range