pub const MAX_DECIMAL256_FOR_EACH_PRECISION: [i256; 77];
Expand description
MAX_DECIMAL256_FOR_EACH_PRECISION[p]
holds the maximum i256
value that can
be stored in a Decimal256
value of precision p
.
§Notes
Each element is the max value of signed 256-bit integer for the specified precision which is encoded to the 32-byte width format of little-endian.
The first element is unused and is inserted so that we can look up using precision as the index without the need to subtract 1 first.
§Example
assert_eq!(MAX_DECIMAL256_FOR_EACH_PRECISION[3], i256::from(999));