LibOpDecimal18DivNP

Git Source

Used for reference implementation so that we have two independent upstreams to compare against.

Opcode to div N 18 decimal fixed point values. Errors on overflow.

Functions

integrity

function integrity(IntegrityCheckStateNP memory, Operand operand) internal pure returns (uint256, uint256);

run

decimal18-div 18 decimal fixed point division with implied overflow checks from PRB Math.

function run(InterpreterStateNP memory, Operand operand, Pointer stackTop) internal pure returns (Pointer);

referenceFn

Gas intensive reference implementation of division for testing.

function referenceFn(InterpreterStateNP memory, Operand, uint256[] memory inputs) internal pure returns (uint256[] memory outputs);