Questions re the metric system

But if that’s a problem, it’s a problem whether we’re talking mm, lb or nautical miles, isn’t it? And somehow people manage to work through the issue whether they’re using mm, lb or nautical miles.

That whole hijack about “metric can’t be used because computer problems” is like saying that “women can’t vote because monkeys are primates”. It tries to link causally two things which are completely irrelevant to each other.

No, I am talking about the concrete application of your iPhone, a set of cheap calipers or the DRO on a knee mill.

This is basic floating point, and here is an example to show that it is a very real practical limitation and not form of abstract math.

http://www-users.math.umn.edu/~arnold/disasters/patriot.html
With floating point any division by a power of 10 will result in rounding and a loss of precision.

No, a pound is 16 oz, a nautical mile is 1/60 of a degree of arc, so you can represent the subordinate number as an exact finite number. There is no rounding needed to represent a nautical mile or an ounce.

And what does this have to do with metric vs. American units?

What’s the binary representation of 1/12th?

Hint: it is an infinite string in binary, just like it is in decimal, because it has a factor of 3.

In decimal, only fractions with a factor of 2 or 5 can be represented with terminating decimals.

In binary, only fractions with a factor of 2 can be represented with a terminating…uh, decimal.

That means fractions of 1/12 can’t be represented in binary exactly, just like fractions of 1/10th. 1/3 also can’t be represented exactly in binary. 1/12th is not a dyadic measure.

Again, all this can be mitigated by finding the smallest unit you’re going to keep track of, and calling that 1 unit, and doing all your calculations as integer multiples of that unit. Just like in the metric shop, don’t use fractions of a centimeter, use millimeters, and then your problems of inexact representations of floating point decimals are over.

And this is why, as Nava says, nobody is going to input 10ths of a centimeter. If the smallest length you care about is 1/10th of a centimeter, you’re going to instead input integer millimeters rather than fractions of a centimeter.

Yes, there is no way to precisely divide by 10 on a binary system. There is also no way to precisely divide by 3, 5, 7, 11, or any other value that is not 2^n. If you’re dividing by 2^n, you’re golden. Anything else, be careful.

Are you claiming that the SI system isn’t decimal, and doesn’t use prefixes that are multiples or powers of 10?

Are you claiming the American/English system does not use decimal numbers? Does your digital caliper display results in 1/64" units? Does your digital bathroom scale read in lb/oz? Does your car’s trip odometer read in miles / feet? Do you use fractional inches in a mechanical drawing?

But this is only the case where you are making a measurement in pounds, and make your measurement to the nearest ounce, and you’re only allowed to enter pounds and ounces in your system. If you’re allowed to enter 3.1 pounds, then the fact that an ounce is 1/16th of a pound is irrelevant.

If you’re only allowed to enter 3.125 pounds, then great. If you can enter 3.1 and not get an error, then your system is going to have the same problems.

And you’re still not protected if a user is allowed to divide your precise 4 pounds 3 ounces into 3 parts. If they try to do that, then we’re back in the Land of Winds and Ghosts, because any division by 3 or 5 or 7 or any number that’s not 2^n will result in a value that has no exact floating point binary representation.

Yes foot is a worse example, but it is a repeat, which results in less loss of precision, and responds to rounding well.

1/12 ~ 0.08333333333333333…

1/10 ~ 0.0001100110011001100110011001100…

But the cumulative errors is what I mentioned before, and that one time loss in precision is mitigated when going to 1/2, 1/4, 1/16, 1/32 because floating point numbers are dyadic. Base 16 is far better there I do admit, but once again I am not advocating for customary units, just saying that there is a reason to use them in some cases.

Feel free to divide 10 by 1-10 and 12 by 1-12 and see the differences there. Had the Finns won and we ignored our thumbs during counting (or any other 8/16 base) it would have been ideal.

Exactly!

I’ve noticed something though; people seem to like their measurement numbers to be in some kind of not too small, not too large range. For example, in Italy, people buy some things by the “Etto”, or 100 gram increments (a hectogram, I suppose). So you’d buy two and a half ettos of prosciutto, not 250 grams or 1/4 kilo. My guess is because most people can’t add/subtract/multiply much more than 2 digit numbers in their heads easily.

I think the US and UK systems have a little bit of an advantage there in customary use (many intermediate metric measurements are rarely used), because the meter/kilo are relatively large, and the millimeter/milligram are so small, and stuff like the hectogram and decagram (or hectoliter/decaliter) aren’t too common. Larger measurements- meters, kilometers, kilograms, liters, etc… aren’t much different than the US/UK versions in that sense; saying I weigh 131 kilos isn’t any different than saying I weigh 290 lbs. But it’s a whole lot more tractable than saying I weigh 13.1 decagrams, 1310 decigrams, or 131,000 milligrams.

There is no rounding needed to represent 0.1 nautical mile, but there is to represent 0.1km? Refuckingally?

It’s said that if we brought together the world’s most intelligent people and tasked them with designing the most confusing system of time keeping imaginable, this would still be easier to understand than the system in use today … just saying …

No there is NO INTRINSIC REASON TO USE DIVISION BY 10 in these systems. Division by 10 may need to be done but…

The ENTIRE metric system is based on division by a number that is not representable in binary floating point. DIVISION and multiplication BY powers of 10 IS THE ENTIRE BASIS OF THE METRIC SYSTEM.

Please to not change my point from that, and I should just quit responding to these posts as I am just adding to thread drift.

I apologize to the board.

There is a reason to use division by 10 in a traditional measurement system if you ever write down or input a number as a decimal. If you ever input 7.3 miles, or 1.2 feet, then you have just input a number that doesn’t have an exact binary representation.

The only way around this is if your system is constrained to only accept inputs with fractions in the form of x/(2^y). But your system probably just accepts decimal inputs, and doesn’t reject inputs like 7.3 miles, or 4.71 pounds. So then what?

Yes, if you accepted inputs, not in decimal but in hexadecimal, then you’d get exact representations of every finite input. But while this is easily possible to imagine and implement, the problem is that your human users will have to be trained to input hexadecimal numbers, and this is a very difficult thing to force them to do. If you’re trying to avoid floating point errors this is one way, but then you’re introducing the problem of input errors when they make mistakes when converting their inputs to hex.

In the real world, we use decimal numbers even for traditional measures like feet, miles, pounds, and hogsheads.

If you use single-precision floating point numbers, then the fact that none of your numbers has an exact binary representation results in an imprecision of about one part in a million. Usually, this doesn’t matter at all, no matter what the cause of that one PPM error. But in the off chance that it does matter, you can instead use double precision floating point numbers (which are the default nowadays anyway, just because computing is so cheap), in which case your error is about one part in a trillion. I defy you to come up with any application at all where that’s not good enough. And even if you are working in the one singular application (yes, that’s meant literally) where even that much precision isn’t enough, you can get higher-precision floating-point packages that will still work.

I think the greatest missed chance with the metric system is that we originally didn’t base it on a multiple of 12… and adjust all our arithmetic, etc, to also be in base 12.

That way you get all the convenient divisors of 12 (halves, thirds, fourths, sixths, twelfths), plus 200 years ago, there was a lot less math and science to convert to base 12.

I think the point isn’t the precision of the answer. The problem is doing comparisons between values. Like, you take a floating point variable, do some operations on it, and then compare the new value with the original value. Is it exactly the same? If you carefully limited your operations to ones that resulted in an exact binary representation, then you can be confident that A’ will exactly equal A. If you haven’t, then A’ might be every so slightly different than A, and your (IF A’==A) statement will return false when you expect it to return true.

So the answer is, don’t do that. Don’t make checks on floating point numbers where the value has to be an exact value, because if you ever once do division by a number that is not 2^n, you will not get an exact binary value.

The great advantage of the US/UK system is that very few units get divided by 3 easily (feet, particularly. Aside from that, the numbers are incredibly arbitrary and have to be memorised. 1760 yard to a mile is ridiculous unless dividing by 11 is a common ocurrence. However, for everyday life, they are perfectly easy to use.
Here in Perú, an SI country, we still have non SI units in common use.

Gasoline is in US gallons (but LPG and LNG in liters and cubic meters)

Nails, pipes and such comes more frequently in inches than mm.

A few things are measured in “Arrobas” (Bushels).

But why ? We count in base 10 for intuitive reasons. We have 10 fingers, 10 toes and 10 testicles (what ? You don’t ? :p). Basing the metric system on that base feels so right, it’s actually downright *weird *that so many traditional unit systems - not just the Imperial system mind you, but also the various currency and weight unit systems used in France circa 1789 - eschewed base 10 altogether.

I’m sure it all made sense at one point, but I can absolutely grok enlightenment thinkers being born in a world where 1 coin of this equal 240 coins of that each of which are equal to 3 and 4/18th of *those *going “WHAT THE HELL ?! No. Just no. Let’s take it back from the top.”
(FTR, a couple years ago I had to work on a 9th century document, a market/fair ordinance that ostensibly tried to set up standards for measures, weights and currencies and it was maddening. The fuckers almost had one separate measuring system per crop)

The mile wasn’t set at 1760 yards, but eight furlongs of 660 feet. The acre was based off the furlong too. 1 furlong by 1 chain (66 feet), the yard is a bit of an outlier post 16th century not that there was a lot of standards back then. A furlong was the typical distance a team of oxen could plough without resting which worked well under the feudal system. (taxation drove most standards, even the metric system)

Oddly he US considered the metric system, but before the French revolution it wasn’t established enough and they adopted the UK system after being frustrated that the congress selected the troy oz for the mint as it was the only viable option at the time.