0.1 + 2.8 ~= 1.1 + 1.8

Also, when comparing float values with the equal operation you’ll have to use a small error of margin in your code. Example:

local A = 0.1 + 0.2
local B = 0.3
local err = 1e-6

print(math.abs(A - B) <= err)
1 Like