Loading

evm_mulmod

Scalar function

EVM MULMOD opcode: (a * b) % n without overflow. Returns 0 if n == 0 (EVM behavior). Uses 512-bit intermediate. Essential for cryptographic operations.

evm_mulmod(UINT256, UINT256, UINT256)

Parameters

Returns

Name Type
result UINT256
1
SELECT evm_mulmod(base, base, modulus) AS squared_mod;
Notebook ready in readonly mode.