java Programming Glossary: int64
Fastest way to determine if an integer's square root is an integer http://stackoverflow.com/questions/295579/fastest-way-to-determine-if-an-integers-square-root-is-an-integer yes for 0. In reading the code below note that my input is int64 x . if x 0 x&2 x & 7 5 x & 11 8 return false if x 0 return true.. bytes out of a word only bitwise and and shifts. int64 y x y y & 4294967295LL y 32 y y & 65535 y 16 y y & 255 y 8 &.. Note untested code if it doesn't work try t 2 or 8. int64 t 4 r 1 t 1 r x r r & t 1 t 1 r x r r & t 1 t 1 r x r r & t..
|