Tirian wrote:I'll grant that ordering decimals is easier. But hauling out big-O is not a sensible metric for talking about a comparison, because schoolchildren are never asked to differentiate between numbers that have large n. I continue to maintain that they are both easy, certainly much easier than making a claim that might force you to explain big-O to a sixth grader.
Big O notation was only one way of going about things, and certainly I wasn't suggesting explaining it to a middle-schooler. In practice for schoolchildren comparing decimals is a lot faster than comparing fractions, and I can't imagine you would have to go to any extraordinary lengths to convince them of this. If you wanted to compare, say, 61/87 and 68/97 you would have to perform a pair of two-digit multiplications, which are hard to do in one's head, so one would either have to juggle a lot of numbers in one's head, get pencil and paper, or use a calculator. On the other hand, it is quite easy to compare 0.70103 and 0.70115. The point is that comparing two decimals continues to be easy even when numbers have many digits, whereas comparing fractions can be rather tricky.
Moreover, this sort of problem comes up all the time in real life. Say you're in a grocery store and you want to get rice as cheaply as possible, but different bags have different prices and different sizes. In such a situation both the quantity and price will routinely be two or three digits. Do you compute which is cheaper by mental arithmetic, or do you just look for the little place on the price tag where it shows the price per unit?
Yakk wrote:FFT multiplication can be done in time linear in the length of the values (admittedly with a large constant). Comparison for equality can also be done in time linear in the number of digits.
So I don't see a O-level domination of decimal digits over rational equality or comparison.
Well, I'm talking about the ease for schoolchildren, rather than computers. And schoolchildren rarely compute products using Fourier transforms.
However, even with computers, comparing decimals is faster than comparing rationals. FFT multiplication is not quite linear, and has a much larger constant, and even the linear time algorithms someone linked (which rely on certain models of computation) will probably be at least an order of magnitude slower. But in practice, with a computer, both are so fast that you rarely care.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.
"With math, all things are possible." —Rebecca Watson