lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi

On 08/09/2013 12:53 PM, Karol Dro wrote:

What is the best way, for test float equality?

You don't.

If you really need to, you need to compare with epsilon:

epsilon = X * 0.00001
XequalY = ((X - epsilon < Y) and (X + espilon > Y))

--
Thomas