3 int test_I_logbitp (int iterations)
7 // Check against ash and oddp.
8 for (i = iterations; i > 0; i--) {
9 uintL a = random32() % 1024;
10 cl_I b = testrandom_I();
11 ASSERT2(logbitp(a,b) == oddp(ash(b,-(sintL)a)), a,b);
13 // Check against ash and logand.
14 for (i = iterations; i > 0; i--) {
15 uintL a = random32() % 1024;
16 cl_I b = testrandom_I();
17 ASSERT2(logbitp(a,b) == !zerop(logand(b,ash(1,(sintL)a))), a,b);
19 // Check against each other.
20 for (i = iterations; i > 0; i--) {
21 uintL a = random32() % 1024;
22 cl_I b = testrandom_I();
23 ASSERT2(logbitp((cl_I)a,b) == logbitp(a,b), a,b);