Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Numbers

Numbers in God are neither specifically intergers, doubles nor floats. They can be any of them; In Nix, integers have an upper and lower boundary of 9223372036854775807 and -9223372036854775807 respectively, as they are two's complement signed integers. God mimics this behavior, albeit slightly simpler due to all data here being completely static.

age = 26;
age-negative = -26;
pi = 3.14;
pi-negative = -3.14;

Important

Not all programming languages can represent these limits effectively; therefore the implementer should document any deviations from these limits clearly for their users.

If the technical details needed for proper usage are not documented by the implementation, the implementation MAY NOT claim to be compliant with this specification.

In practice, a number is a sequence of one or many numeric digits, it may be used with a leading negation operator for negative numbers.

my-numbers = [ 1 2 3 -4 -516.8 ];

Note that unlike in Nix, exponent notation is not valid; God is intended to be a completely static format. For exponential numeric values to be useful, they would need to be computed by the parser, which is not something God intends to do. If exponent notation is needed, it should be written as a string value and computed by other means.