Thread: Perfect sqquare
View Single Post
Old 2011-08-24, 15:57   #6
JohnFullspeed
 
May 2011
France

7×23 Posts
Default 3

Like you sayd a mod 10 give the result ,But on a CISC a AND is speeder than a div so with a AND the time will be the same on the two processors
and it hope than in
(n & 7 == 1) or (n & 31 == 4) or (n & 127 == 16) or (n & 191 == 0)
the 3 was tested with the 1 and 2 test or the 2 and 4 or ...

first N must be odd!!!! (n & 1 == 1)
J
JohnFullspeed is offline   Reply With Quote