mirror of
https://github.com/lua/lua.git
synced 2025-01-14 05:43:00 +08:00
7f5c31cdca
As an example, 'print(string.format("%.99f", 1e70))' may have a lot of garbage after the number. The old test to ensure that 'string.format("%.99f", n)' was not too large, 'fabs(n) < 1e100', assumes that the number will fit in the 99 bytes; but the 99 is not the space for the number, it is the added extra zeros. The option worked for smaller numbers because of the extra space added to MAX_ITEM.