Lua maxinteger
Anonymous contributor
Published Oct 18, 2023
Contribute to Docs
In Lua, the math.maxinteger is a constant that is part of the Lua math library. The math.maxinteger constant is used to return the largest possible integer value.
Note: The
math.maxintegerconstant is only available in Lua 5.3 and above. For earlier versions of Lua, themath.hugeconstant is available instead.
Syntax
As maxinteger is a part of the standard Lua math library, it must be called as math.maxinteger.
math.maxinteger
Example
To find the largest possible integer value in Lua:
print(math.maxinteger)
This results in something like the following output:
9007199254740991
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Lua on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours
- Learn the basics of Lua, a general-purpose programming language used for building games, web apps, and developer tools.
- Beginner Friendly.4 hours