| ??? 06/15/09 12:00 Read: times |
#166084 - For example Responding to: ???'s previous message |
bool IsPowerOfTwo (dword value) { // Determining if an integer is a power of 2 bool result; result = !(value & (value - 1)) && value; return result; } |
| Topic | Author | Date |
| an algorithmic puzzle | 01/01/70 00:00 | |
| For example | 01/01/70 00:00 | |
| that fast? | 01/01/70 00:00 | |
| Other interesting tricks in base-2: | 01/01/70 00:00 | |
| yuk | 01/01/70 00:00 | |
| this depends on your definition of logic | 01/01/70 00:00 | |
| Its a good solution | 01/01/70 00:00 | |
| Why huge? | 01/01/70 00:00 | |
| Infinite? | 01/01/70 00:00 | |
| Yes | 01/01/70 00:00 | |
| Offset | 01/01/70 00:00 | |
| this was supposed to be fun, Kai | 01/01/70 00:00 | |
| I always take you seriously... | 01/01/70 00:00 | |
pure software | 01/01/70 00:00 |



