On Fri, Jun 6, 2008 at 3:10 PM, Ryan McKinley <[EMAIL PROTECTED]> wrote:
>>
>> +    num = 234;
>> +   //?????  why 1?
>> +   // assertEquals( 0, BitUtil.ntz(num) );
>> +   // assertEquals( 0, BitUtil.ntz2(num) );
>> +   // assertEquals( 0, BitUtil.ntz3(num) );
>> +  }
>
> Any idea why the answer is 1?  the docs say "(only works for x!=0)"

ntz is for binary bits (the other test cases just happen to be the
same in binary and decimal - pretty funny).
Anyway 234 in binary is 11101010  (1 trailing zero)


-Yonik

Reply via email to