StaticBigInt
An immutable arbitrary-precision signed integer.
Declaration
@frozen struct StaticBigIntOverview
StaticBigInt is primarily intended to be used as the associated type of an ExpressibleByIntegerLiteral conformance.
extension UInt256: ExpressibleByIntegerLiteral {
public init(integerLiteral value: StaticBigInt) {
precondition(
value.signum() >= 0 && value.bitWidth <= 1 + Self.bitWidth,
"integer overflow: '\(value)' as '\(Self.self)'"
)
self.words = Words()
for wordIndex in 0..<Words.count {
self.words[wordIndex] = value[wordIndex]
}
}
}