docs: update to define integer overflow
Change-Id: Ie8a1b31035f2d27a220e5df2e9e178ec3b39ee68
This commit is contained in:
parent
917c9bdee7
commit
a8f443d960
|
@ -59,8 +59,10 @@ The result is a [Boolean] value.
|
||||||
|
|
||||||
## Arithmetic
|
## Arithmetic
|
||||||
|
|
||||||
Numbers are type-compatible:
|
Numbers will retain their type unless mixed with other numeric types:
|
||||||
Pure integer operations will always return integers, whereas any operation involving at least one floating point number return a floating point number.
|
Pure integer operations will always return integers, whereas any operation involving at least one floating point number returns a floating point number.
|
||||||
|
|
||||||
|
Integer overflow (of 64-bit signed integers) and division by zero are defined to throw an error.
|
||||||
|
|
||||||
See also [Comparison] and [Equality].
|
See also [Comparison] and [Equality].
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,9 @@
|
||||||
Numbers, which can be *integers* (like `123`) or *floating point*
|
Numbers, which can be *integers* (like `123`) or *floating point*
|
||||||
(like `123.43` or `.27e13`).
|
(like `123.43` or `.27e13`).
|
||||||
|
|
||||||
|
Integers in the Nix language are 64-bit signed integers.
|
||||||
|
Integer overflow is defined to throw an error.
|
||||||
|
|
||||||
See [arithmetic] and [comparison] operators for semantics.
|
See [arithmetic] and [comparison] operators for semantics.
|
||||||
|
|
||||||
[arithmetic]: ./operators.md#arithmetic
|
[arithmetic]: ./operators.md#arithmetic
|
||||||
|
|
Loading…
Reference in a new issue