Sign in
chromium
/
external
/
github.com
/
google
/
error-prone
/
b4c55352f99aee460e730bd117fe2bf1234d4d2d
/
.
/
docs
/
bugpattern
/
XorPower.md
blob: 816898517db6eb549603a43e954ab8c3de892a2d [
file
] [
view
]
The
`^`
binary XOR
operator
is
sometimes mistaken
for
a power
operator
,
but e
.
g
.
`2 ^ 2`
evaluates to
`0`
,
not
`4`
.
Consider
expressing powers of
`2`
using
a bit shift instead
.