--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lua-l/4682d1bd-705e-4c9a-aeef-fde03d2735a4%40cdelord.fr.
--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lua-l/20240717184236.GA655824%40arraial.inf.puc-rio.br.
To view this discussion on the web visit https://groups.google.com/d/msgid/lua-l/cfa68909-8f6c-4ed2-b697-ce6236dd9061n%40googlegroups.com.
n1 = -1.00
n2 = -1.01
diff = math.abs(n1-n2)
tol = 0.01
epsilon = tol / 100 — This is for my case a good value
if (diff > tol) then print("It's due to floating number representation.") end
if (diff-too < epsilon) then print("the numbers are equal. That´s what I want.") end
--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lua-l/20240717184236.GA655824%40arraial.inf.puc-rio.br.
What does forbid one to compile a C99 compatible version of Lua, with full ieee 764 features ?
Anyway you can still load (require) an addon library when you extra precision, or need support for decimal floating point (which, as opposés to what was sais in a prior msg, has hardware support notably for IEEE 754 decimal formats, plus features allowing efficient implementations of BCD decimals for big integers, big rationals or big decimal floats with very large mantissa (used in several well known librairies to implement them in other languages and math tools) it's easy to implement a Lua extension library that is used to expose in Lua the features implemented in well known efficient librairies)
--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lua-l/XiiJgm4RPZC6AyR7tBJqxBRzk5Fn9Nmo-4-MyjKdZHkB7n9W15W5awmUNPLCq6Xd2XfES4xdRxaXU1f0tyNB15Sem5z2h-vgFIqwK-TXRr4%3D%40proton.me.
Anyway you can still load (require) an addon library when you extra precision, or need support for decimal floating point