Search Apps Documentation Source Content File Folder Download Copy Actions Download

doc.gno

0.66 Kb ยท 13 lines
 1// Package int256 implements 256-bit signed integer arithmetic for GnoSwap.
 2//
 3// This package provides an Int type that represents a 256-bit signed integer
 4// using two's complement representation. It supports the full range from
 5// -(2^255) to 2^255-1, with arithmetic operations that detect overflow.
 6//
 7// The implementation follows Ethereum's int256 semantics, ensuring compatibility
 8// for cross-chain DeFi protocols. Operations are optimized for common AMM
 9// calculations including tick math and price computations.
10//
11// Critical operations like Add, Sub, and Mul return overflow flags, enabling
12// safe handling of edge cases in financial calculations.
13package int256