Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这些陈述是等价的吗?
value1 / pow(2, value2)和 value1 >> value2
value1 / pow(2, value2)
value1 >> value2
value1 % value2 和value1 & ( value2 - 1) (value2 是 2 的幂)
value1 % value2
value1 & ( value2 - 1)
我很好奇何时可以是 32 位或 64 位整数value1。value2
value1
value2