<html><head><style>body{font-family:Helvetica,Arial;font-size:14px}</style></head><body><div style="font-family:Helvetica,Arial;font-size:14px; ">From: Akira Kakuto <a href="mailto:kakuto@w32tex.org"><kakuto@w32tex.org></a></div><div class="airmail_ext_on" style="color:black">Date: <span style="color:black">10 March 2019 at 15:27:09</span><br></div><div class="airmail_ext_on" style="color:black"><span style="color:black"><br></span></div> <div><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span><div></div><div>> bad argument #2 to 'format' (number has no integer representation)<span class="Apple-converted-space"> </span><br><br>I think that this is a difference between lua-5.2 and lua-5.3.<span class="Apple-converted-space"> </span><br>lua-5.3 seems to require, for example:<span class="Apple-converted-space"> </span><br>string.format('%d', math.floor(math.pi))<span class="Apple-converted-space"> </span></div></span></blockquote></div><p>Or string.format('%.0f',math.pi).</p><p>That will follow different rounding rules, though, so that if you feed it math.exp(1), you get '3', not '2'.</p><p>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).</p><p>– Harald</p></body></html>