The arithmetics of orders of magnitude

When you’re comparing two quantities in terms of “orders of magnitude”, AIUI you’re essentially just counting the number of powers of ten between them. So If A has 10 (101) widgets and B has 10,000 (104), that’s a difference of three orders of magnitude.

Does this mean that where the difference is not a whole power of ten, other factors are rounded according to normal rounding rules? So if A has 10 widgets and B has 49, they’d be in the same order of magnitude because the 49 gets rounded down to 101, but if B had 51 they’d be one order of magnitude apart because the 51 gets rounded up to 102?

Why are you assuming rounding?

Both 49 and 51 are one order of magnitude greater than 10. So is 99.

Well, my thought was that there must be some line where the order of magnitude changes. 11 is obviously the same order of magnitude as 10, and so are 12, 13, etc. If 49 is one order of magnitude greater than 10, there must be a line somewhere between 13 and 49 where the order of magnitude changes. My assumption was that this line was determined by rounding - 49 is 4.9 times 10, and 4.9 gets rounded down to 1 (100) for the purposes of powers of ten, but 51 is 5.1 times 10, and 5.1 gets rounded up to 10 (10²) (50 would be a borderline case). If the line is not determined by this sort of rounding, how is it?

The scale is exponential, not linear.

My example is incorrect; 49, 51 & 99 are the same order of magnitude as 10. And all one order of magnitude greater than 9.

Generally when you’re comparing, you look at the first digits to see if they’re close. 49 and 51 are the same order of magnitude. 49 and 510 are one order of magnitude apart.

Also, generally I round 30, 300, etc. down, and greater numbers up. The reason is that log10(30) =~ 1.5. It’s halfway between the orders of magnitude in exponential space.

Not sure what you mean in this context by a “line”?

You are comparing numbers to see how big they are; the question is which factors may be neglected. We could try to be more precise, but in your example, 49/51 ≈ 0.96 ≈ 1 so they are of the same magnitude; the rounding here is in the last step where we say 0.96 is approximately 1. Note, however, that for x sufficiently huge it will not be distinguishable from, e.g., 2x=10^{\log_{10}x+\log_{10}2} or from 10x.

Another way to think about it is in terms of powers of 10. You would not say that 4 and 5 were of the same magnitude, as you can easily perceive the difference. But for numbers between, let’s say, 10 and 1000000, if you re-write them as 10^1 and 10^6 you can see that the magnitude is now given by the exponent. Back to your example, both 49 and 51 are approximately 10^{1.7}. You probably want to keep the two digits there, whereas 10^{51.7} may as well be 10^{52} or 10^{51}. Now 10^{10^{10^{1.7}}} belongs to a class of altogether bigger numbers, and you do not need to add too many layers to the cake before reaching a point where the numbers are irrelevant to even the most speculative physical considerations.

I think it is not misleading to say that the validity of an instance of rounding or approximation depends on the application.

IMO order of magnitude is sort of an estimation effort. Or at least an approximation effort. Which means some info will be lost along the way, and there may not be a single clear unambiguous rule on how to proceed.

One approach is to adjust both numbers into normalized 1.234E56 notation with a single digit to the left of the decimal. Then compare only the exponents. Period. The exponents are the order of magnitude.

That gives the @Schnitte result that 1 through 9.999~ are E0, 10 through 99.999~ are E1, and 100 - 999.999~ are E2. Which is a perfectly reasonable way to go.

The @Strangelove approach of then looking at the mantissa and if it exceeds 3.0, add an extra 1 to the exponent to derive the order of magnitude also works. As he says, you’re in essence taking the log base 10 and rounding that up or down from near the halfway point in log space. So sticking to integers for a minute, 1-3 is E0, 4-30 is E1, and 31-300 is E2.

If you want to get fancier yet, the actual halfway point in exponential space is 10^1.5 ~=31.62277. Or at least that’s what it is to 7 sigfigs which oughta be enough for anyone ( :wink: ) . So compare your normalized mantissas to 3.162277 and if the mantissa is greater, add 1 to their exponent to obtain their order of magnitude.

Well, this is confusing.

Which is why they said in their second post that they’d made a mistake in their first one.

I don’t know how I missed that.

Anyway, I like the standard of >31 meaning a new order of magnitude.

Rather than thinking in discrete “numbers of zeros” it’s better to think of it as a continuous graph of the base-10 logarithm (which is the same for 10, 100, 1000 etc but gives you a smooth sensible value for 49, 51, etc).

One way to think about it, if you are just trying to roughly estimate some quantity [“How many piano tuners are there in Chicago?”], and you are off by as much as a factor of 3 either way, you have done a good job.

(I am going with 3 here, not 10 or 15)

When comparing measurements in terms of relative orders of magnitude, logarithmic factors are often used with differences expressed in decibels (dB) is used. This is done in all kinds of signal processing or comparison because signals (whether acoustic, electronic, structure-borne vibration, et cetera) tend to be perceived and do damage on a logarithmic power scale such that a doubling of dB is ten times the factor. (For field or ‘root-power’ quantities, the power factor or exponent comes out and multiplies the factor of ten, so a doubling is twenty times the factor.) This both gives a more precise and mathematically useful way of comparing measurements on scales of orders of magnitude.

For instance, the difference between 49 and 51 is 0.174 dB (significant figures are typically added when calculating decibels relative to the scale difference) which you can immediately see by the digit to the left of the decimal is not very much. If the figures being compared were 4.9 and 510, however, the difference in dB would be 20.174, which you can see by the figures left of the decimal shows that there are big differences in magnitude (approximately two orders of magnitude). You can see how this is mathematically more precise than just talking about ‘orders of magnitude’ because you can make quantitative comparisons.

Stranger

Wikipedia has an article:

It says “Two numbers are “within an order of magnitude” of each other if their ratio is between 1/10 and 10.”

By this definition, 10 would be within an order of magnitude of anything between 1 and 100.

I would always take the log of the ratio, and then state that number, rounded to whatever degree is appropriate. For instance, 300 is about one and a half order of magnitude greater than 10 (rounded to perhaps the nearest half order of magnitude), or 2000 is about three orders of magnitude greater than 10 (rounded to the nearest integer order of magnitude).

Of course, as with any other measure of approximate closeness, this is not transitive: 10 is of the same order of magnitude as 11, 11 is the same order of magnitude of 12, … 99 is the same order of magnitude as 100, but 10 is definitely not the same order of magnitude as 100.