1. A programmable multi-level error correction method, comprising: modeling a probability distribution as a first polynomial having a basis; converting the first polynomial to a second polynomial having a different basis; and defining a Hamming distance distribution from the second polynomial.