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: 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.
NJoy [[User:NevilleDNZ|NevilleDNZ]] 02:39, 8 December 2011 (UTC)

NJoy [[User:NevilleDNZ|NevilleDNZ]] 03:17, 8 December 2011 (UTC)