docs: def rs_calc_syndromes(msg, nsym, fcr=0, generator=2):
      '''Given the received codeword msg and the number of error correcting symbols (nsym), computes the syndromes polynomial.
      Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse).
      '''
      # Note the "[0] +" : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluator polynomial, etc. but not the errors positions).
      # This is not necessary as anyway syndromes are defined such as there are only non-zero coefficients (the only 0 is the shift of the constant here) and subsequent computations will/must account for the shift by skipping the first iteration (eg, the often seen range(1, n-k+1)), but you can also avoid prepending the 0 coeff and adapt every subsequent computations to start from 0 instead of 1.
      return [0] + [gf_poly_eval(msg, gf_pow(generator, i+fcr)) for i in xrange(nsym)]