fork | group |
---|---|
Frontier |
Stop and Arithmetic Operations |
Index 1 is top of the stack. See PUSH.
All values are treated as two’s complement signed 256-bit integers. Note the overflow semantic when −2255 is negated.
a
: integer numerator.b
: integer denominator.
a // b
: integer result of the signed integer division. If the denominator is 0, the result will be 0.
* | Input | Output | * | * | Input | Output |
---|---|---|---|---|---|---|
1 |
10 |
1 |
* | 1 |
0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE |
2 |
2 |
10 |
* | 2 |
0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
The state changes done by the current context are reverted in those cases:
- Not enough gas.
- Not enough values on the stack.