[luatex] behavior of string.format
harald.hanche-olsen at ntnu.no
Sun Mar 10 16:01:57 CET 2019
From: Akira Kakuto <kakuto at w32tex.org>
Date: 10 March 2019 at 15:27:09
> bad argument #2 to 'format' (number has no integer representation)
I think that this is a difference between lua-5.2 and lua-5.3.
lua-5.3 seems to require, for example:
That will follow different rounding rules, though, so that if you feed it math.exp(1), you get '3', not '2'.
Even the format string '%.f' gives the same result in practice, but only '%.0f' guarantees the absence of a decimal point according to the specification (see man sprintf).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the luatex