Quote:
problem wasn't the performance, problem was space.
|
Yes I know, as I wrote "I know it was written because of the "old" ATMega 168 space limitations." But it's an very easy way for Arduino users to increase performance and accuracy without changing to 20MHz.
Quote:
So if multiplication does not fit into 32bit variable, it overflows and gets corrupted?
Or is it just to gain 0.00..% more accuracy
|
We are multiplying very huge numbers, and an unsigned long reaches from 0 to 4,294,967,295. If you multiply (for example) 70000*70000, the result already breaks this range. So it's not just for accuracy, it will throw completely wrong values because you create an overflow!