Intop-Power2 impl

Implement <unittest_generic_bits_power2>.

Summary
Intop-Power2 implImplement <unittest_generic_bits_power2>.
CopyrightThis program is free software.
C-kern/api/math/int/power2.hHeader file of Intop-Power2.
C-kern/math/int/power2.cImplementation file Intop-Power2 impl.
test

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2011 Jörg Seebohn

C-kern/api/math/int/power2.h

Header file of Intop-Power2.

C-kern/math/int/power2.c

Implementation file Intop-Power2 impl.

test

Determines if integer i is: (i == 0) || (i == pow(2,x)) or calculates 2 to the power of x such that (pow(2,x) >= i) && (pow(2,x-1) < i).
Implement unittest_generic_bits_power2.
Close