Regarding multiplication,
puts 8.52*10; #multi
the answer is 85.199999 it is not 85.2. why does it happen.
Regarding multiplication,
puts 8.52*10; #multi
the answer is 85.199999 it is not 85.2. why does it happen.
The simple answer is that there is no floating point number equal to exactly 85.2.
One way to understand this is because floating point numbers are basically represented using scientific notation in base 2.
This video does a really good job of explaining.
Floating Point Numbers - Computerphile