You're replying to a comment by cyanide.

cyanide Permalink
January 18, 2017, 00:45

I haven't read "Hacker's Delight", but all (non-obvious) tricks in you article are mentioned here.

Unfortunately, some of them, like

min = y ^ ((x ^ y) & -(x < y));
max = x ^ ((x ^ y) & -(x < y));
abs = (x ^ (x >> 31)) - (x >> 31) // For 32-bit signed int

seem to be less efficient than obvious:

min = x < y ? x: y;
max = x < y ? y: x;
abs = x < 0 ? -x: x;

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "apple_143": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.