functions Hamming weight

Issue #1175 closed
Former user created an issue

Hello, It could be great to have a function to compute Hamming weight. Hamming distance can be easily obtained as it is only a xor but i don't see how to compute Hamming weight. Thanks for all the good work.

Comments (3)

  1. Helder Correia repo owner

    Add popcount() function (Hamming weight / Population count)

    Add new built-in popcount(n) function to compute Hamming weight over the existing 256-bit two’s complement bitwise model.

    Fix issue #1175

    → <<cset 474e76226f7e>>

  2. Log in to comment