Merge pull request #12844 from aathan/patch-6

Update operators.rst
This commit is contained in:
Leo
2022-08-13 14:25:07 +02:00
committed by GitHub
+3 -1
View File
@@ -18,7 +18,9 @@ and the type of the operator's result:
In case one of the operands is a :ref:`literal number <rational_literals>` it is first converted to its
"mobile type", which is the smallest type that can hold the value
(unsigned types of the same bit-width are considered "smaller" than the signed types).
If both are literal numbers, the operation is computed with arbitrary precision.
If both are literal numbers, the operation is computed with effectively unlimited precision in
that the expression is evaluated to whatever precision is necessary so that none is lost
when the result is used with a non-literal type.
The operator's result type is the same as the type the operation is performed in,
except for comparison operators where the result is always ``bool``.