Constant MIN_DECIMAL256_FOR_EACH_PRECISION

Source
pub const MIN_DECIMAL256_FOR_EACH_PRECISION: [i256; 77];
Expand description

MIN_DECIMAL256_FOR_EACH_PRECISION[p] holds the minimum i256 value that can be stored in a Decimal256 value of precision p.

§Notes

Each element is the min value of signed 256-bit integer for the specified precision which is encoded to the 76-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!(MIN_DECIMAL256_FOR_EACH_PRECISION[3], i256::from(-999));