Number type
Learn about the type that represents number values.
Number is the supertype of all numeric types, including integers and real numbers such as decimals and floats.
Learn more on how to represent numeric values in number literals.
Ordinal
An ordinal is a natural number representing a position in a sequence, such as 1st, 2nd, 3rd, and so on.
The underlying type is a 64-bit integer. However, because ordinals are unsigned, the range is limited to 1 through 9223372036854775807.
Learn more on how to represent ordinals in ordinal literals.
Integer
An integer represents a whole number, either positive or negative.
The underlying type is a 64-bit signed integer, meaning that values can range from -9223372036854775808 to 9223372036854775807.
Learn more on how to represent integers in integer literals.
Decimal
A decimal refers to precise real numbers that include a fractional part.
Unlike integers, decimals do not have maximum or minimum values but do have a maximum precision of 28 significant digits.
Learn more on how to represent decimals in decimal literals.
Float
Floats represent approximated real numbers and are commonly used for continuous values that do not require precision.
The underlying float type is a 64-bit floating-point number. It can accurately represent integers within the range of -9007199254740991 to 9007199254740991 and a subset of decimal numbers.
Learn more on how to represent floats in float literals.