Neko Numbers

Numbers in Neko may be integers (whole numbers) or floats. Integers are 31-bits, so they have a range from -1073741824 to 1073741823. Floats are stored as 64-bit doubles. There is also a library provided for manipulating 32-bit integers here.

Number Operations

The following operations can be performed with any two numbers:

Note that division of two integers may return a float.

Integer Operations

The following operations can only be used with integers:

Integer Functions

The following functions can be used with integers and are more efficient than the operators above:

Number Conversions

Number Checks

Integer Overflow

Neko does not deal with integer overflow. Positive overflow will result in the value of -1, negative overflow results in 1. Keep in mind the range for integers given above.