bitset_in(s,m) returns wrong answers for sets of size
m=320+k*128, k>=0. Linux-only, works on macOS
Found while working on
https://github.com/sagemath/sage/issues/41472
(fixing this bitsets issue will fix the latter)
# save as t.pyx and run
# sage: %runfile t.pyx
# sage: t(320), and more generally t(320+k*128) for k>=1
# false on macOS, true on Linux, oops
from sage.data_structures.bitset_base cimport *
def t(n):
cdef bitset_t s
cdef int i
cdef int max
max = n
bitset_init(s, max)
for i in range(max):
bitset_set(s, i)
return bitset_in(s, max)