lua-users home
lua-l archive

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

Mark Hamburg wrote:
I know this is a rather artificial example, but I find the result somewhat

I think the only way this becomes viable is if integers are just a more
"efficient" storage format for floating point values.


Yes, and the people who are going to be using the LNUM patch and programming for the embedded systems for which it is most useful (for speed and storage reasons; 'efficiency') will probably be experienced enough to avoid possible errors arising from the conversions.

If you're developing using an LNUM-patched Lua, it'd be a good idea to always test your code under unmodified Lua as well as the LNUM-patched version to make sure there are no discrepancies in the results. Test suites, although extensive, can only go so far, and there are bound to be specific cases (as Roberto showed) that can escape the otherwise passive change. Testing your own code in both number systems is the most thorough way to identify any bugs that are caused by it.