lua-users home
lua-l archive

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


> Anything based on floating-point equality deserves to fail.

This is a misconception. The problem is comparing floating-point numbers
for equality when they may come from different sources, say one is read
and the other is computed. You then indeed have to be careful.

Moreover, it's what Lua already provides: table indexing for floating-point
numbers based on equality.