|
|
|
|
|
by gridspy
460 days ago
|
|
This optimization is important because you can then discard most of the number in question, bounding the integer size required for computation. For instance you could store the number in question in a 128 bit integer, shift left (double), check for odd digits (a series of modulo & divide operations) and then truncate using a modulo and subtract. You can repeat this process as long as you like. If you find an all evens number than you can do a more expensive indepth check. |
|