Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 832 Bytes

File metadata and controls

32 lines (22 loc) · 832 Bytes
fork Frontier
group Stop and Arithmetic Operations

Notes

All intermediate calculations of this operation are not subject to the 2256 modulo.

Stack input

  1. Integer: first value to multiply.
  2. Integer: second value to multiply.
  3. Integer: denominator.

Stack output

  1. Integer: result of the multiplication followed by a modulo. If the denominator is 0, the result will be 0.

Examples

Input Output * Input Output
10 4 * 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 9
10 * 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
8 * 12

Error cases

The transaction is reverted in those cases:

  • Not enough gas.
  • Not enough values on the stack.