Talk:Find first and last set bit of a long integer: Difference between revisions
Content added Content deleted
m (→Initial C code specimen requires a long int algorithm: new section) |
m (→Initial C code specimen requires a long int algorithm: first left bit set, and the first right bit set?) |
||
Line 46: | Line 46: | ||
Try using [[wp:Duff's device|Duff's device]] to unroll wider '''bits''' types. |
Try using [[wp:Duff's device|Duff's device]] to unroll wider '''bits''' types. |
||
A thought: maybe ( as C has given us << ''left'' shift and >> ''right'' shift ) this '''bits''' task should be asking for the first left bit set, and the first right bit set? This would be "type agnostic" avoiding confusion with ''integer''s arithmetic properties. |
|||
⚫ | |||
⚫ |