Advertisement
Miseryk

C++ Branchless IsNegative

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