Booleans and numbers#
CEL has primitive types for boolean and numeric values.
Booleans#
The boolean type has two values: true and false.
Integers#
Integers are 64-bit signed values.
Literals can use decimal or hexadecimal (0x) notation.
Literals that exceed the 64-bit signed range cause a compile error.
Unsigned integers#
Unsigned integers are 64-bit and use the u suffix.
Literals that exceed the 64-bit unsigned range cause a compile error.
Doubles#
Doubles are 64-bit IEEE 754 floating-point numbers.
Scientific notation is supported.
There are no literals for special values, but they can be produced through division or parsed from strings.
See also#
- Arithmetic operators - Numeric operations
- Comparison operators - Equality and ordering
- Logical operators - Boolean logic