# Orders of magnitude

BANGED OUT QUICK – MIGHT BE MISTAKES

Programmers daily work with 32 and 64 bit quantities so it’s sometimes easy to loose sight of scale. Additionally humans are better at thinking in terms of linear changes and have difficult with fast growing functions. Likewise once number get bigger/smaller beyond some point, any additional bigger/smaller has less and less meaning to to point where changes become somewhat meaningless.

Distances (in meters) greater than 106 are officially termed “Astronomical”, which is ~223.

The following table list some powers-of-two along with the bounding factorials and some quantities of that scale:

[tr][td]Number[/td][td]Relation of scale to real world[/td][/tr]
[tr][td]

``````12!  < 2<sup>32  </sup>  < 13![/td]
[td]

- The diameter of the sun is ~2<sup>30</sup>m.
- The number of people alive today (~2^32).

[/td]
[/tr]

[tr][td]
``````

20! < 264 < 21![/td]
[td]
- The number of people whom have ever lived: ~237
- Thickness of the Milky Way’s gaseous disk ~255Km
- The distance from the sun to Proxima Centauri is ~255m
- The age of the universe is ~259 seconds.
[/td]
[/tr]

[tr][td]

``````34!  < 2<sup>128 </sup>  < 35![/td]
[td]

- The observable universe has an estimated radius of 93 billion lightyears which is ~2<sup>119</sup> nanometers.

[/td]
[/tr]

[tr][td]
``````

57! < 2256 < 58![/td]
[td]

``````  - A tight bounding box around a proton occupies ~2<sup>199</sup> [url=http://en.wikipedia.org/wiki/Planck_volume]planck volumes[/url]
- The radius of the observable universe is ~2<sup>205</sup> [url=http://en.wikipedia.org/wiki/Planck_length]planck lengths[/url]
``````

[/td]
[/tr]

[tr][td]

``````98!  < 2<sup>512 </sup> <  99!
``````

[/td]
[td]

``````  - The number of atoms in the observable universe is ~2<sup>266</sup>.
``````

[/td]
[/tr]
[tr][td]

``````170! < 2<sup>1024</sup> < 171!
``````

[/td]
[td]

``````  - The number of [url=http://en.wikipedia.org/wiki/Planck_volume]planck volumes[/url] in the observable universe is ~2<sup>614</sup>.
``````

[/td][/tr]

Notice to reach a mere 2614 we are measuring the incomprehensibly large in terms of the incomprehensibly small.

Now consider the value of 264-232. Without stopping to think you might be tempted say that this is ~232, when actually the value is ~264-2[sup]-32[/sup] or ~263.999999999664.

Since we’re programmers it is probably more useful to consider computation. Real world examples below are using FLOPS measurements.

• AMD 7970 system which can perform ~244 computations per second and ~268 per year.
• The Cray Titan which can perform ~254 computations per second and ~279 per year.
• It’s estimated super computers will reach ~260 per second by 2018.
• It’s estimated super computers will reach ~270 per second around 2030.
• Imagine an atom which is a quantum computer that can perform one computation per Plank’s time (5.39106*10-44s). Then this atom computer can perform ~2144 computations per second and ~2169 per year.
• Imagine a supercomputer made of all the atoms in the observable universe which is ~1080, each of which is one of the above, resulting in ~2410 computations per second and ~2435 per year.

We’ll also define a time scale BB which is equal 4.339*1017s, the amount of time from the big bang until now.

The Titan can perform 264 computations in ~17 minutes and 2128 in ~216 BB.
The atom computer could perform 2128 computations in ~15 milliseconds and 2256 in ~253 BB.
The universe could perform 2256 computations in less than one Plank time and 2512 in ~243 BB.

It would take the Titan ~265 years to perform one second of the atom computer. The big bang was merely ~234 years ago. It would take the atom computer ~2241 years to perform one second of the “universe” super computer.