Yeah, it's mathematically sound. If you multiply m x n, there will be m + n - 1 'sections' to count. The numbers in those sections are going to be the numbers that have the same first digit log10.
In the second example, 1x1, 2x2, and 3x3, all get added in the middle section because 100x1, 20x20, and 3x300 all have a log10 of 2 (floored).
EDIT: Sorry, I worded that wrong. The log of the individual numbers (floored) will sum to be the same in each section.
(i.e. log 100 = 2, log 1 = 0, 2 + 0 = 2)
|