NTL implementation of a cyclic TFT algorithm and its associated middle product