testequal(h2bits(1), 0); testequal(h2bits(0), 0); testequal(h2bits(0.5), 1); testequal(h2bits(0, 0.5), 1); testclose(h2bits(rand, 0.5), 1); testequal(h2bits(0.5, 0), Inf); pp = rand(1e3,1); testequal(h2bits(pp, pp), h2bits(pp)); testequal(h2bits([1 1], [1 0]), [0 Inf]); testequal(h2bits([0 0], [1 0]), [Inf 0]); test_exit