Steven Schveighoffer wrote: > using your highbit function, which is very neat BTW > Thanks, but I can't claim credit for it. It's a classical algorithm which comes up regularly in programming discussions and newsgroups...
> uint maxor(uint mina, uint maxa, uint minb, uint maxb) > { > return maxa | maxb | ((1 << highbit(((1 << (max(highbit(mina ^ > maxa), highbit(minb ^ maxb)) + 1)) - 1) & maxa & maxb)) - 1); > } > Neat! Jerome -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr
signature.asc
Description: OpenPGP digital signature