You are viewing a single comment's thread. Return to all comments →
long andProduct(long a, long b) { if (a==b) return a; return ~(oneFill(a^b))&(a|b); }
// onefill is a function that will fill all bits to the right starting with the leftmost 1 to 1
Seems like cookies are disabled on this browser, please enable them to open this website
AND Product
You are viewing a single comment's thread. Return to all comments →
long andProduct(long a, long b) { if (a==b) return a; return ~(oneFill(a^b))&(a|b); }// onefill is a function that will fill all bits to the right starting with the leftmost 1 to 1