, 1 . , 8.2 . 8.2 irb #round(2), , 8.2, . , 8.2, .
. , , -8,2 , , , . : (a * 1000000).round
, , . ; .
.
x/2 n. , - x/(2 n * 5 m). 5 m , 2 n. , m == 0 , . , 1.25 , 5/(2 2 * 5 0), 0,1 , 1/(2 0 * 5 1). , 1.01.. 1.99 3 : 1,25, 1,50 1,75.
Since 8.2 does not have an exact representation, it repeats itself in binary forever, never adding exactly to 8.2. It goes on ad infinitum as 1100110011 ...
1. But note that you may need to a.round(1)use 2. Instead, the parameter #roundis the number of digits of the digits you want, not the number of significant digits. In this case, the result was the same, and it did not matter.