Advertisement
Miseryk

C++ Branchless Abs v3

Mar 22nd, 2023
746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.06 KB | Source Code | 0 0
  1. int abs(int x)
  2. {
  3.     return (x ^ (x >> 31)) - (x >> 31);
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement