I think this should be `(1<<(c1-emin)) | (1<<(c2-emin)) | (1<<(c3-emin)) ...` Otherwise I misunderstood the whole approach.