Question: I writing some astronomical programs, and I have available the source code for Jeffrey Sax's implementation of the algorithms in Meeus' book Astronomical Algorithms.

One of the functions he has written is ReadReal(), which obtains a real number from the user (via the keyboard or terminal). An extract from this function looks like this:

```
scanf("%lf", &r);
return r * 1.000000000000001;

```

The multiplication by the constant on the second line evidently has something to do with rounding but I cannot see exactly what. I have searched for answers, and the constant appears in many places on various sites but not in this context. Does anyone have experience of this or know what is going on here? Is it important?

Thanks for any help.

Answer: 
This refers to the **density parameter, Ω**, defined as the average matter density of the universe divided by a critical value of that density. This selects one of three possible geometries depending on whether Ω is equal to, less than, or greater than 1. These are called, respectively, the flat, open and closed universes. Have a look at the picture below for a visual representation.

![Visual representation of the density parameter](https://i.stack.imgur.com/XcQSu.jpg)

The value of Ω you specify is determined in **Big Bang Theory** and gives rise to what is the known as the **Flatness Problem**. For more info on that go to [wiki again](http://en.wikipedia.org/wiki/Flatness_problem).

To understand the importance of the density parameter have a look at the [ultimate fate of the universe](http://en.wikipedia.org/wiki/Ultimate_fate_of_the_universe#Density_parameter), it also gives a fuller explanation of Ω.
Floating point numbers in most architectures (which use [IEEE754](http://en.wikipedia.org/wiki/Double_precision_floating-point_format) representation) can only represent numbers extactly which have a **finite binary expansion**, i.e. which are exactly represented by a number like `11.00100100001` (and the length of the string is limited by the size of the floating point type, e.g. 53 for `double`).

Any number which is not of this form, i.e. which is not a finite sum of powers of two, such as 1/3 or 1/5 or 1/10, can **never** be expressed exactly by a such floating point variable. 

Since users often enter values like `0.1`, rather than the more apt `0.125`, this loss of exactness is often encountered quite early on in settings such as yours. Multiplying by that constant of yours is one way that the author on his platform found to get closer to what he thought the user intended. It's all subjective, though. If you just print with short precision, `printf("%0.5f", x)`, you shouldn't notice the lack of exactness.