count++) x &= x-1; return count; } //This is better if most bits in x are 0. //It uses 2 arithmetic operations and one comparison/branch per "1" bit in
For an integer q ≥ 1, a Dirichlet character modulo q is an arithmetic function(英语:arithmetic function) χ : Z → C {\textstyle \chi :\mathbb {Z} \to \mathbb