lua-users home
lua-l archive

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


Thanks for the answers.

Robert


On Sun, 2 Jun 2019 at 16:36, Philippe Verdy <verdy_p@wanadoo.fr> wrote:
Le sam. 1 juin 2019 à 11:43, Francisco Olarte <folarte@peoplecall.com> a écrit :
Also, "significant precision", standalone, has no meaning. You need to
state the problem to know what is the significant precision.
I stated that: a "significant precision" is the precision by which two numbers can remain distinct for == or ~= in Lua.

It is that precision that the tostring() should preserve to create an equivalence between (x == y) and (tostring(x) == tostring(y)), where x and y are ANY Non-NaN Lua number values (including infinite values, or denormal values, or negative zero if they are supported).
This is notably needed to create safe (de)serializers.