This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LUA Scientific Conversion loose decimal
#3
(09.05.2022, 09:33)admin Wrote: This should work:
Code:
num = 1000000012345685
str = string.format("%.16g", num)

My issue is elsewhere...

The POST request returns 1000000012345685 as body in a JSON formatted reply
LUA Automatically converts 1000000012345685 to 1.00000001234568e+15 
I need to prevent the automatical conversion to scientific notation OR assume such number as string
Reply


Messages In This Thread
RE: LUA Scientific Conversion loose decimal - by emme - 09.05.2022, 09:57

Forum Jump: