Question: ```
1.824999999999999.round(2)
# => 1.82
1.82499999999999999.round(2)
# => 1.83

```

I don't understand why the result in the first case is `1.82` and for the latter `1.83`. My desired result is `1.82` for both cases.

Answer: 
As is well known, a floating number in computer has errors. Notice that both numbers that you have are close to `1.825`. In your first case, the number is small enough to be differentiated from `1.825`.

```
1.824999999999999
# => 1.824999999999999

```

In your second case, having enough `9`s makes the value close enough to be considered exactly as `1.825`:

```
1.82499999999999999
# => 1.825

```

Then, when you apply `round`, you get `1.83`.
After a certain number of (binary) digits, Ruby cannot represent differences between `Float` literals, even if you've entered the value directly in source code or the console

```
 1.82499999999999999 == 1.825
 # => true

```

If you *really* need a high level of precision, then you could look at the `BigDecimal` class. Although you could still enter enough `9`s to reach limits in that class.