# Brush up your maths: Decimals

## Place value

We use the decimal representation of numbers, a system which we imported from India via the Arab world and which replaced the old Roman numeral system.

The number forty-three is represented by 43. This means 4 tens and 3 units or ones. Compare 43 to the much more clumsy Roman XLIII.

We call this the place value system, because the value of a digit depends on its place in the sequence, as units, tens, hundreds, etc. The system is possible because we have a symbol for zero, 0. The number 301 is three hundred and one. We know that the 3 represents three hundreds, because the 0 puts 3 at the third place to the left, the hundreds place. The invention of zero was a work of Indian genius.

A great advantage of the place value system is that we can represent numbers less than one also. We do this by putting in a decimal point after the units place. 0·1 means one tenth. 0·23 means 2 tenths and 3 hundredths. As a fraction this would be 23/100. 1·23 means 1 unit and 2 tenths and 3 hundredths.

In the last paragraph, we used the symbol "·" for the decimal point. Unfortunately, printers appear to struggle with this and prefer to use ".", the same as the full stop symbol. This makes maths much harder to read. We have become much more familiar with "." as the decimal point than we are with "·", so from now on we shall use it. The wonders of computer type-setting have now made the "·" symbol much easier, however, and some journals have resurrected it. We may see it more often in future.

If we do not use numbers less than one very often, they can be confusing. Which of these numbers is larger, 0.1 or 0.02? 2 is bigger than 1, but the place value system tells us that we have 1 tenth compared with 2 hundredths. So 0.1 is bigger than 0.02.

If we have a number like one hundred, we represent it in the decimal system by putting the 1 in the hundreds place: 100. Sometimes we have a number like one and a half million. How can we represent that? First we turn the one and half into a decimal, giving 1.5 million. Then we put 1 in the millions place and 5 in the hundred thousands: 1500000.

Long strings of digits can be hard to read, so we often put commas after every third digit from the decimal point: 1,500,000. We can do this in both directions. For example, one thousand, four hundred and thirty seven point one five six four would be 1,437.156,4. In some countries they do it the other way round, exchanging the symbols "." and ",". A German might write the number as 1.437,156.4. Some publishers' printers put a thin space instead: 1 437.156 4. Oxford University Press does this.

### Exercise: place value

Put these numbers into order from smallest to largest: 0.1, 0.005, one thousand, 1.001, 100, 0.050.

## Converting fractions to decimals

We turn a fraction into a decimal by dividing the numerator by the denominator. For example, what is 4/5 as a decimal? It is 0.8 because 4 ÷ 5 = 0.8. Try it on a calculator.

Sometimes the decimal goes on and on for ever. 1/3 = 1 ÷ 3 = 0.3333333333333... and the threes never stop. We call this 3 recurring.

### Exercise: converting fractions to decimals

What are 3/4 and 17/10 as decimals?

## Decimal places

Some decimal numbers go on for ever, like 1/3 = 0.33333333333333333... Others have a very long series of digits after the decimal point, for example, 4.3485554217654. As we get further to the right in these numbers, the digits become less and less important. For example, the difference between 3.333333 and 3.333330 is only 3 millionths.

As these digits may be unimportant, we often cut the number short. We give the number to a finite number of decimal places. For example, let us give 4.3485554217654 to six decimal places: 4.348555. The difference between 4.3485554217654 and 4.348555 is very small, it is 0.0000004217654. This means that 4.348555 is a pretty good representation of 4.3485554217654.

What about 1/3 = 0.3333333333333333...? We might give this to two decimal places, as 0.33, or to four decimal places as 0.3333. We call the process of discarding surplus digits rounding.

There is a problem with cutting off the digits on the right. Sometimes this is not the closest to our original, exact number. If we want 4.3485554217654 to two decimal places, we might think 4.34 would be correct. We would be wrong. 4.35 is closer to 4.3485554217654 than is 4.34. This is because the first digit we cut off, 8, is large. What we do is round numbers up if the first digit to be cut off is 5, 6, 7, 8, or 9. We add one to the rightmost remaining digit. We round numbers down, leaving the last remaining digit as it is, if the first digit to be cut off is 0, 1, 2, 3, or 4.

When we round 4.3485554217654 to two decimal places, the leftmost digit we cut off is 8. Therefore, we round up to make the right digit of the rounded number 5 instead of 4, giving us 4.35. When we round 4.3485554217654 to one decimal place, the leftmost digit we cut off is 4. Therefore, we round down and leave the right digit of the rounded number as 3, giving us 4.3.

If we round up and the last of the remaining digits is a 9, this makes the last digit 10. This then becomes zero and increases the preceeding digit by 1. For example, 123.6978 to two decimal places is 123.70, because the 9 becomes 10, we write 0, and increase the preceeding 6 to 7. This can ripple up through many digits. 0.99999 to four decimal places is 1.0000. Each 9 becomes 10 and so increases the 9 before it.

Sometimes our number appears shorter than the number of decimal places we want. For example, we might want to make a table look neat by giving everything to the same number of decimal places. What is 2.5 to two decimal places? We put a zero in the second decimal place: 2.50.

### Exercise: decimal places

Give the following numbers to two decimal places: 123.7111, 3.4667, 7.61, 9.665, 10, and 53.499.

## Decimals and computers

Most of our calculations are done using computers. Some strange things happen to decimal numbers inside computers.

Computers do not use decimal numbers for calculations and have to translate them to and from the binary representation which they use. This means that sometimes the numbers do not come back in the same way they went in. For example, the number 1.00 might go into a computer, but what the computer shows you might be 0.9999999. It might also show you 1.0000001. Now, these are three different ways of showing the same thing. If we reduce the number of decimal places they become 1.000000. But it can be quite disconcerting.

The computer programmer usually has no idea how big the numbers which result from the calculations might be. The program will be written to display numbers to as great an accuracy as the computer can achieve. This is fine for a number like 453.0, because it does not take up many columns on the screen. But what about 0.0000004536512? That would take a lot of columns. The computer will have a maximum number of columns which it can display, fewer than the 15 columns which 0.0000004536512 occupies. What the computer does is shift the decimal point. It displays the number as 4.536512E–7. This means take 4.536512 and shift the decimal point seven places to the left. In the same way, 453,651,202 would be displayed as 4.536512E+8, meaning shift the decimal point 8 places to the right.

### Exercise: decimals and computers

What is meant by 7.453E+6?

What is meant by 7.453E–6?

Which of these numbers might be a computer representation of 5: 5.000001, 5.100000, 4.999999, 4.0999999?