rabin_miller algorithm in C++ and lua(bitnum.lua):wq