# Appropriate Units

### Overview

Recently I have been programming a unit conversion system to automatically convert between units of different systems of measurement. So for example the standard metric system of volume is based on the litre (L) and multiples of it as determined by standard SI prefixes, for example a millilitre (mL). Values in this system can be converted to other systems such as an Imperial system comprising of fluid ounces (fl oz), quarts (qt), pints, (pt), and gallons (gal). Simple conversions between such systems are fairly simplistic, we follow these steps:

- We convert our initial measurement to an arbitrary value in the same system. For example we can divide a US gallon by 128 to get a fluid ounce.
- We convert to our standardised measurement for that system into a standardised measurement for the desired system. For example by dividing our measurement, now in US fluid ounces by 29.57 to convert it to millilitres. In practice this may go through a standardised base system, so we can convert from US fluid ounces to UK fluid ounces by going through an intermediary system such as metric system of litres.
- Now we have an accurate measurement in the new system. However our initial measurement in gallons now looks rather unwieldy in millilitres. The obvious next step is to convert it back to a sensible measurement, maybe litres. Such a conversion is just a reversal of step one.

Easy right? What is the hard part in this process? The sheer amount of country specific systems is just tedious, but not difficult.

### Question

One hard question arises:

When should we convert between units in the same system?

*This part is going to be a bit of a thought experiment for me…* It appears that no one has answered this question before. Or if they have, I can’t find it. We are taught to intuitively convert between units: 230 metres sounds right, 23,000 centimetres just sounds wrong. Even the BIPM, the official organisation of SI units has nothing to say. In talking to a few people there seems to be a vague conclusion as to what ‘sounds’ right. It seems to come to come down to the number of significant figures one plans to use and the size of the number. Lets explore a simple SI system, which is probably fairly consistent across all SI systems: The Metre (or Meter for you American types) - 1 m = 100 cm = 1,000 mm = 0.001 km

123.45 mm sounds better than 0.12345 m and 12.345 cm (5.sf) - we like to split up numbers into manageable parts. Though this becomes fairly irrelevant when we have lots of significant figures, we want just the first part to be manageable. For example, 123,456,789.5678923 m is awful, 123.4567895678923 Mm is better, or at least it would be if we used the megametre on an everyday basis.

Scientists and engineers will say it is nicer to take that last measurement and put it into scientific form, but while this is all very well for large units, we don’t like reading scientific form for more ‘normal’ values that we might encounter on an everyday basis. Cut a 320 cm length is better that 3.2 x 10^1 m, 3.2 m is best (assuming 2 s.f.).

From what I can see, minimising the total number of characters is what counts. 3.2 m has two three characters to show the value. 320 cm also has three, but dots are better than zero as we can use it to break down the number in our head.

### Some Rules

So using this, let’s tentatively set out some formal rules. Note, this is currently an experimental idea and not tested!

- We need to know value, initial unit, available units and the multiplier required to each (in the final system), and the final number of s.f. the number is required in.
- If current number characters in value (including commas, place holder zeroes and dots) < the number of characters of converted values, then it is the best choice.
- If this is tied, those with the lowest number place holder zeros are preferred. Followed by commas. Followed by dots (in systems where commas not dots separate large number strings).
- If all else fails, the unit closest the default should be used, presumably this will be a little more familiar and useful - at least for SI systems.
- For values with low significant figures (where s.f. < 4), step
*iii.*will be pretty much irrelevant. - If the total length is > s.f. + 5 then scientific notation should be used.
- For unit systems outside a standard metric view, use the larger unit.

Here you go sir, your units shaken not stirred. Does this make logical sense to you? Any comments?