let set v n b =
if n < 0 or n >= v.length then invalid_arg "Bitv.set";
let (i,j) = pos n in
if b then
Array.unsafe_set v.bits i
((Array.unsafe_get v.bits i) lor (Array.unsafe_get bit_j j))
else
Array.unsafe_set v.bits i
((Array.unsafe_get v.bits i) land (Array.unsafe_get bit_not_j j))