Round it up!

Circle of Life
Circle of Life

Quite often a visit to Wikipedia starts of a train of thought that might end up as a post here, and often I forget the reason that I was visiting Wikipedia in the first place. However in this case I remember what sparked my latest trip to Wikipedia.

I was looking at the total number of posts that I have made and it turns out that I have posted 256. This is post number 257, which is a prime number incidentally. To many people 256 is not a particular interesting number but to those who program or have an interest in computers or related topics, it is a round number.

US 256
US 256

A round number, to a non-mathematician is a number with one or more zeroes at the end of it. In the numbering system with base 10, in other words what most people would considered to be the normal numbering system, 1000 would be considered to be a round number. In many cases 100 would also be a round number and sometimes 10 would be as well.

In the decimal system, which is another name for the normal numbering system, the number 110 would probably not usually be considered a round number. However, if we consider numbers like 109, 111, 108 and 112, then 110 is a round number relative to those numbers. Rounding is a fairly arbitrary thing in real life, usually.

We come across round numbers, or at least rounded numbers in the supermarket on a daily basis, if we still use cash. Personally I don’t. I recall when the one cent and two cent coins were introduced people were appalled that the supermarkets would round their bills to the nearest convenient five cents.

5 lirot
5 lirot


So a person would go to a supermarket and their purchases would total to, say, $37.04. The cashier would request payment of $37.05. Shock! Horror! The supermarket is stealing $0.01 off me! They must be making millions from all these $0.01 roundings. In fact, of course, the retailer is also rounding some amounts down too, so if the bill was $37.01 the customer would be asked to pay only $37.00. So the customer and the supermarket, over a large number of transactions, would end up even.

Then of course the 5 cents coins were removed and this added an extra dilemma. What if the total bill was $37.05? Should the customer’s bill be rounded to $37.00 or to $37.10? This is a real dilemma because, if the amount is rounded up, then the supermarket pockets five cents in one ten cases, and if it is rounded down the supermarket loses five cents in one in ten cases. If the supermarket a thousand customers in a day, one hundred of them will pay five cents more than the nominal amount on their bill, meaning that the supermarket makes a mere five dollars.

Big Money
Big Money

The emotional reaction of the customer, though, is a different thing. He or she may feel ripped off by this rounding process and say so, loudly and insistently. Not surprisingly most supermarkets and other retailers choose to round such bills down. Of course, all the issues go away if you don’t use cash, but instead use some kind of plastic to pay for your groceries, as most people do these days.

There are degrees of roundness. In one context the number 110 would be considered round, if you are rounding to the nearest multiple of ten. If you are rounding to the nearest multiple of one hundred, then 110 is not a round number, or, in other words a rounded number. If we are rounding to the nearest multiple of three, then 110 is not a rounded number but 111 is (111 is 37 multiplied by 3).

Binary Backdrop
Binary Backdrop

Real numbers can be rounded too. Generally, but not always, this is done to eliminate and small errors in measurement. You might be certain that the number you are reading off the meter is between 3.1 and 3.2, and it seems to be 3.17 or so, so you write that down. You take more measurements and then write them all down.

Then you use that number in a calculation and come up with a result which, straight out of the calculator, has an absurd number of decimal places. Suppose, he said, picking a number out of the air, the result is 47.2378. You might to choose to truncate the number to 47.23, but the result would be closer to the number that you calculated if you choose to round it 47.24.

Currency Symbols
Currency Symbols

A quick and easy way to round a real number is to add half of the order of the smallest digit that you want to keep and then truncate the number. For the example number the order of the smallest digit is 0.01 and half of that is 0.005. Adding this to 47.2378 gives 47.2428, and truncating that leaves 47.24. Bingo!

Another way of dealing with uncertain real numbers such as results from experiments is to calculate an error bound on the number and carrying that through to the calculated result. This is more complex but yields more confidence in the results than mere rounding can.


To get back to my 256th post. Why did I say that this is a round number in some ways? Well, if instead of using base 10 (decimal), I change to using base 16 (hexadecimal) the number 256 (base 10) becomes 100 (base 16), and those trailing zeroes mean that I can claim that it is a round number.

Similarly, if I choose to use base 2 (binary), 256 (base 10) becomes 100000000 (base 2). That is a really round number. But if I use base 8 (octal), 256 (base 10) becomes 400 (base 8). It’s still a round number but not as round as the binary and hexadecimal versions are, because it start with the digit 4. As a round number its a bit beige.

It’s interesting (well it is interesting to me!) that there are no real numbers in a computer. Even the floating point numbers that computers manipulate all the time are not real numbers. They are approximations of real number stored in a special way (which I’m not going to into).

General Double Precision Float
General Double Precision Float

So when a computer divides seven by three, a lot of complex conversions between representations of these numbers goes on, a complex division process takes place and the result is not the real number 2.333333…. but an approximation, stored in the computer as a floating point number which only approximate, while still being actually quite accurate.

One third
One third


Why Pi?

Based on Image:P math.png
Based on Image:P math.png (Photo credit: Wikipedia)

If you measure the ratio of the circumference to the diameter of any circular object you get the number Pi (π). Everyone who has done any maths or physics at all knows this. Some people who have gone on to do more maths knows that Pi is an irrational number, which is, looked at one way, merely the category into which Pi falls.

There are other irrational numbers, for example the square root of the number 2, which are almost as well known as Pi, and others, such as the number e or Euler’s number, which are less well known.

Illustration of the Exponential function
Illustration of the Exponential function (Photo credit: Wikipedia)

Anyone who has travelled further along the mathematical road will be aware that there is more to Pi than mere circles and that there are many fascinating things about this number to keep amateur and professional mathematicians interested for a long time.

Pi has been known for millennia, and this has given rise to many rules of thumb and approximation for the use of the number in all sorts of calculations. For instance, I once read that the ratio of the height to base length of the pyramids is pretty much a ratio of Pi. The reason why this is so leads to many theories and a great deal of discussion, some of which are thoughtful and measured and others very much more dubious.

Menkaure's Pyramid
Menkaure’s Pyramid (Photo credit: Wikipedia)

Ancient and not so ancient civilisations have produced mathematicians who have directly or indirectly interacted with the number Pi. One example of this is the attempts over the centuries to “square the circle“. Briefly squaring the circle means creating a square with the same area as the circle by using the usual geometric construction methods and tools – compass and straight edge.

This has been proved to be impossible, as the above reference mentions. The attempts to “trisect the angle” and “double the cube” also failed and for very similar reasons. It has been proved that all three constructions are impossible.

English: Drawing of an square inscribed in a c...
English: Drawing of an square inscribed in a circle showing animated strightedge and compass Italiano: Disegno di un quadrato inscritto in una circonferenza, con animazione di riga e compasso (Photo credit: Wikipedia)

Well, actually they are not possible in a finite number of steps, but it is “possible” in a sense for these objectives to be achieved in an infinite number of steps. This is a pointer to irrational numbers being involved. Operations which involve rational numbers finish in a finite time or a finite number of steps. (OK, I’m not entirely sure about this one – any corrections will be welcomed).

OK, so that tells us something about Pi and irrational numbers, but my title says “Why Pi?”, and my question is not about the character of Pi as an irrational number, but as the basic number of circular geometry. If you google the phrase “Why Pi?”, you will get about a quarter of a million hits.

Animation of the act of unrolling a circle's c...
Animation of the act of unrolling a circle’s circumference, illustrating the ratio π. (Photo credit: Wikipedia)

Most of these (I’ve only looked at a few!) seem to be discussions of the mathematics of Pi, not the philosophy of Pi, which I think that the question implies. So I searched for articles on the Philosophy of Pi.

Hmm, not much there on the actual philosophy of Pi, but heaps on the philosophy of the film “Life of Pi“. What I’m interested in is not the fact that Pi is irrational or that somewhere in its length is encoded my birthday and the US Declaration of Independence (not to mention copies of the US Declaration of Independence with various spelling and grammatical mistakes).

Pi constant
Pi constant (Photo credit: Wikipedia)

What I’m interested in is why this particular irrational number is the ratio between the circumference and the diameter. Why 3.1415….? Why not 3.1416….?

Part the answer may lie in a relation called “Euler’s Identity“.

e^{i \pi} + 1 = 0

This relates two irrational numbers, ‘e’ and ‘π’ in an elegantly simple equation. As in the XKCD link, any mathematician who comes across this equation can’t help but be gob-smacked by it.

The mathematical symbols and operation in this equation make it the most concise expression of mathematics that we know of. It is considered an example of mathematical beauty.

Embed from Getty Images

The interesting thing about Pi is that it was an experimental value in the first place. Ancient geometers were not interested much in theory, but they measured round things. They lived purely in the physical world and their maths was utilitarian. They were measuring the world.

However they discovered something that has deep mathematical significance, or to put it another way is intimately involved in some beautiful deep mathematics.

English: Bubble-Universe's-graphic-visualby pa...
English: Bubble-Universe’s-graphic-visualby paul b. toman (Photo credit: Wikipedia)

This argues for a deep and fundamental relationship between mathematics and physics. Mathematics describes physics and the physical universe has a certain shape, for want of a better word. If Pi had a different value, that would imply that the universe had a different shape.

In our universe one could consider that Euler’s Relation describes the shape of the universe at least in part. Possibly a major part of the shape of the universe is encoded in it. It doesn’t seem however to encode the quantum universe at least directly.

English: Acrylic paint on canvas. Theme quantu...
English: Acrylic paint on canvas. Theme quantum physics. Français : Peinture acrylique sur toile. Thématique physique quantique. (Photo credit: Wikipedia)

I haven’t been trained in Quantum Physics so I can only go on the little that I know about the subject and I don’t know if there is any similar relationship that determines the “shape” of Quantum Physics as Euler’s Relation does for at least some aspects of Newtonian physics.

Maybe the closest relationship that I can think of is the Heisenberg Uncertainty Principle. Roughly speaking, (sorry physicists!) it states that for certain pairs of physical variables there is a physical limit to the accuracy with which they can be known. More specifically the product of the standard deviations of the two variables is greater than Plank’s constant divided by two.

English: A GIF animation about the summary of ...
English: A GIF animation about the summary of quantum mechanics. Schrödinger equation, the potential of a “particle in a box”, uncertainty principle and double slit experiment. (Photo credit: Wikipedia)

In other words, if we accurately know the position of something, we only have a vague notion of its momentum. If we accurately know its velocity we only have a vague idea of its position. This “vagueness” is quantified by the Uncertainty Principle. It shows exactly how fuzzy Quantum Physics.

The mathematical discipline of statistics underlay the Uncertainty Principle. In a sense the Principle defines Quantum Physics as a statistically based discipline and the “shape” of statistics determines or describes the science. At least, that is my guess and suggestion.

Embed from Getty Images

To return to my original question, “why Pi?”. For that matter, “why statistics?”. My answer is a guess and a suggestion as above. The answer is that it is because that is the shape of the universe. The Universe has statistical elements and shape elements and possibly other elements and the maths describe the shapes and the shapes determine the maths.

This is rather circular I know, but one can conceive of Universes where the maths is different and so is the physics and of course the physics matches the maths and vice versa. We can only guess what a universe would be like where Pi is a different irrational number (or even, bizarrely a rational number) and where the fuzziness of the universe at small scales is less or more or physically related values are related in more complicated ways.

Embed from Getty Images

The reason for “Why Pi” then comes down the anthropological answer, “Because we measure it that way”. Our Universe just happens to have that shape. If it had another shape we would either measure it differently, or we wouldn’t exist.

Embed from Getty Images



Round numbers

Zero (Photo credit: chrisinplymouth)

It seems that we have a fascination for numbers that end in zeros. One thousand (1,000) and one million (1,000,000) and so on and to a lesser extent numbers like one hundred (100) and ten thousand (10,000). Fractions of round numbers also appeal to people. Reaching the age of 50 (half of 100) or 75 (3/4 of 100) is considered an interesting milestone while reaching 74 or 51 for some reason is not so interesting.

English: One Billion Dollar Artwork
English: One Billion Dollar Artwork (Photo credit: Wikipedia)

However some fractions are not even noticed. At the age of 33 years and 4 months you will be 1/3 of 100 years old and at 66 years and 8 months you will be 2/3 of 100 years old. When I passed the second milestone, I mentioned it to people and they didn’t seem to care. No prezzies were forthcoming.

There is one special number that could be considered a round number, and the wellspring of all round numbers and that is the number zero. The first number which is usually considered a round number is ten (10), where the zero indicates the absence of any digit (except zero itself, which is normally considered a numeric digit), and the 1 is positional and represents the number ten or ten units. Stick another zero on the end has the effect of multiplying all the digits in the number by ten, so 10 becomes 100 which represents one hundred.

One zero zero for dummies 2011-04
One zero zero for dummies 2011-04 (Photo credit: hare :-))

The number 100 could be considered to be, reading from the right, zero ‘units’, zero ‘tens’ and one ‘hundred’. 110 is zero ‘units’, one ‘ten’ and one ‘hundred’ giving the number one hundred and ten. When I was learning arithmetic as a small boy, while I grasped the principles quickly enough, I continued to ponder this mapping process from numbers, like seven hundred and thirty one to the mathematical representation of 731. Maybe I was a strange child. I still ponder it, even today. I look on “seven hundred and thirty one” as a name of the number, ‘731’ as a representation of the number, and the number itself as some ineffable thing. Maybe I grew up to be a strange adult!

Notice that above I said that “seven hundred and thirty one” is a name of the number and ‘731’ is a representation of the number. This is because there can be other representations of the same number, mainly in different bases. For all the numbers above I’ve used the number ten (10) as the base, but I could have used another base, such as sixteen (16) which is frequently used in computers. The number “seven hundred and thirty one” in base 10 representation is represented as ‘2D8’ in base 16 or hexadecimal representation. The ‘D’ is in there to represent the number thirteen (decimal 13).

Hexadecimal multiplication table
Hexadecimal multiplication table (Photo credit: Wikipedia)

Any positive integer can be used as a base. The bigger the base the more ‘digits’ are required to represent numbers, making them hard to read and hard to calculate with, so a base of ten (10) is a reasonable choice for general use. Negative integers can also be used as bases, but then things get very difficult! I’ve occasionally wondered if rational numbers or real numbers could be used as bases, but I can’t see how that would work.

Computers are interesting, since they, at the lowest level, appear to use a base of two (2), which is the smallest possible positive integer base. The numbers are conceptually simple strings of ones (1) and zeros (0) called ‘bits’. It’s not as simple as that however as in the computer’s central processor the data and programs are shunted around like little trains of bits, switching from track to track and in many cases circulating round small loops, merging with other trains of bits, eventually arriving in stations called buffers.

English: Train comes into Sheringham with frei...
English: Train comes into Sheringham with freight waiting to leave A typical railway scene with the enginemen on the engine, a train arriving and two spotters noting numbers. This is all part of the ‘That’s yer lot’ gala on the North Norfolk gala. (Photo credit: Wikipedia)

These buffers can be 8 bits long (one byte) or 16 bits long (2 bytes) or even longer. The length is related to the architecture of the processor, and a 64-bit processor can handle addresses, integers and data path widths up to 64 bits, so effectively they naturally use numbers up (but not including) decimal 18,446,744,073,709,551,616! Computer people can’t read such long strings of bits of course so they convert the numbers to base sixteen (16) otherwise known as hexadecimal. It’s still very long, but can be handled and is less error prone than long strings of zeros and ones.

An illustration of an example IPv6 address
An illustration of an example IPv6 address (Photo credit: Wikipedia)

Round numbers are very useful as abbreviations. Saying nine thousand, eight hundred and seventy three is a lot more verbose than “about ten thousand” and is sufficiently accurate for many purposes.

One interesting use of round numbers is found in the nominal sizing of disk drives. To a computer person one byte is the smallest unit of storage. Bytes are usually grouped into ‘kilobytes’ where in this sense the prefix ‘kilo’ stands for one thousand and twenty four, and kilobytes are grouped into ‘megabytes’ where in this sense the prefix ‘mega’ stands for one thousand and twenty four again, and megabytes are grouped into ‘gigabytes’. This means that to a computer person a gigabyte contains 1,073,741,824 bytes. So this number (and numbers with the smaller prefixes of kilo and mega) are round numbers to computer people, because, if expressed in hexadecimal or binary bases these numbers end with long strings of zeros!)

Six hard disk drives with cases opened showing...
Six hard disk drives with cases opened showing platters and heads; 8, 5.25, 3.5, 2.5, 1.8 and 1 inch disk diameters are represented. (Photo credit: Wikipedia)

There is a source of confusion here, because outside of the computer world, the prefixes of kilo, mega and giga are defined in terms of thousands. A kilogram is one thousand grams. Technically a megagram would be a thousand kilograms or a million of grams. This confusion impacts the computer world when computer disks size are given. To a computer disk manufacturer a gigabyte is one thousand million bytes, not a bit over one thousand and seventy three million bytes as mentioned above.

This leads to disappointment when purchasing disks. A nominally one hundred gigabyte disk will contain one hundred thousand thousand thousand bytes (100,000,000,000) but when when formatted will be able to contain less than ninety three gigabytes as the computer world counts bytes and that doesn’t take into account the overhead of the method of storing data on the disk. This overhead is necessitated by the need to hold the file names and locations on the disk itself so that the files can be retrieved.

There is no right or wrong way to consider bytes on disks and so computer people are in general now aware that if they buy a disk it will not seem (to them) to be quite as big as advertised. The moral is to ask what people mean when they use round numbers.

English: 2 Gigabyte MicroSD (TransFlash) card....
English: 2 Gigabyte MicroSD (TransFlash) card. Photo created from 20 single frames using Focus stacking. Deutsch: microSD-(TransFlash-)Karte mit 2 Gigabyte Kapazität. Foto erstellt aus 20 Einzelaufnahmen mittels Focus-Stacking (Photo credit: Wikipedia)

I was going to go into topics like giving change and Swedish rounding, but this post is already long enough. I will just mention that the topic of round numbers came to me because this is my fiftieth post! Fifty is sort of a round number, I suppose. It is halfway to a proper round number.

Reverse of Coin
Reverse of Coin (Photo credit: Wikipedia)