Revision Difference
number#561930
<title>Numbers & Integers</title>
<cat>Dev.Lua</cat>
All numbers in Lua use the [double-precision floating-point format](https://en.wikipedia.org/wiki/double-precision_floating-point_format). Even integers are stored in this format. The <page>math</page> library is often used with numbers.All numbers in Lua use the [double-precision floating-point format](https://en.wikipedia.org/wiki/double-precision_floating-point_format). Even integers are stored in this format. The <page>math</page> library is the primary number operation library that contains trigonometric, rounding and useful constants. The following is a comprehensive list of all valid ways to define numbers in Lua.⤶
⤶
```lua⤶
print(⤶
123, --- 123⤶
123.456, --- 123.456⤶
123.456e7, --- 1234560000⤶
0x123.456e7, --- 291.271216...⤶
123e4, --- 1230000⤶
-- 123e4.5 is not valid, most likely due to syntax ambiguity⤶
)⤶
```