WideUInt
public struct WideUInt : Sendable
extension WideUInt: Hashable
extension WideUInt: Comparable
extension WideUInt: Numeric, AdditiveArithmetic
extension WideUInt: CustomStringConvertible
An unsigned integer with an arbitrary, but fixed, bit width.
-
The underlying value.
Try to avoid using this; it’s only public as part of our workarounds for https://github.com/apple/swift/issues/62498.
Declaration
Swift
public private(set) var value: BigUInt { get } -
The fixed bit width; the maximum representable number is 2 to the
bitWidthpower minus one.Declaration
Swift
public let bitWidth: Int -
Declaration
Swift
public init<Bits>(truncatingIfNeeded bits: Bits, toWidth bitWidth: Int) where Bits : BinaryInteger -
Declaration
Swift
public init(truncatingIfNeeded bits: BigUInt, toWidth bitWidth: Int) -
Declaration
Swift
public static func < (l: `Self`, r: `Self`) -> Bool -
Declaration
Swift
public typealias Magnitude = `Self` -
Declaration
Swift
public var magnitude: Magnitude { get } -
Undocumented
Declaration
Swift
public static func <<= <RHS>(lhs: inout WideUInt, rhs: RHS) where RHS : BinaryInteger -
Undocumented
Declaration
Swift
public static func >>= <RHS>(lhs: inout WideUInt, rhs: RHS) where RHS : BinaryInteger -
Declaration
Swift
public static func *= (lhs: inout WideUInt, rhs: WideUInt) -
Undocumented
Declaration
Swift
public static func /= (lhs: inout WideUInt, rhs: WideUInt) -
Undocumented
Declaration
Swift
public prefix static func ~ (x: `Self`) -> WideUInt -
Undocumented
Declaration
Swift
public init<T>(_ source: T) where T : BinaryInteger -
Undocumented
Declaration
Swift
public var words: BigUInt.Words { get } -
Undocumented
Declaration
Swift
public init<T>(clamping source: T) where T : BinaryInteger -
Undocumented
Declaration
Swift
public init<T>(truncatingIfNeeded source: T) where T : BinaryInteger -
Declaration
Swift
public init?<T>(exactly source: T) where T : BinaryInteger -
Undocumented
Declaration
Swift
public init?<T>(exactly source: T, bitWidth: Int) where T : BinaryInteger -
Declaration
Swift
public static func - (lhs: WideUInt, rhs: WideUInt) -> WideUInt -
Declaration
Swift
public init(integerLiteral literal: BigUInt.IntegerLiteralType) -
Undocumented
Declaration
Swift
public typealias Words = BigUInt.Words -
Undocumented
Declaration
Swift
public init?<T>(exactly source: T) where T : BinaryFloatingPoint -
Undocumented
Declaration
Swift
public init<T>(_ source: T) where T : BinaryFloatingPoint -
Undocumented
Declaration
Swift
public var trailingZeroBitCount: Int { get } -
Undocumented
Declaration
Swift
public static func / (lhs: WideUInt, rhs: WideUInt) -> WideUInt -
Undocumented
Declaration
Swift
public static func % (lhs: WideUInt, rhs: WideUInt) -> WideUInt -
Undocumented
Declaration
Swift
public static func %= (lhs: inout WideUInt, rhs: WideUInt) -
Declaration
Swift
public static func * (lhs: WideUInt, rhs: WideUInt) -> WideUInt -
Undocumented
Declaration
Swift
public static func &= (lhs: inout WideUInt, rhs: WideUInt) -
Undocumented
Declaration
Swift
public static func |= (lhs: inout WideUInt, rhs: WideUInt) -
Undocumented
Declaration
Swift
public static func ^= (lhs: inout WideUInt, rhs: WideUInt) -
Declaration
Swift
public static func + (lhs: WideUInt, rhs: WideUInt) -> WideUInt -
Declaration
Swift
public typealias IntegerLiteralType = BigUInt.IntegerLiteralType -
Returns an instance with the same
bitWidthasselfwhose value is the (truncated if necessary) result ofcombine(self.value, rhs.value).Precondition
self.bitWidth==rhs.bitWidthDeclaration
Swift
private func matchingWidth(_ rhs: WideUInt, combine: (BigUInt, BigUInt) -> BigUInt) -> WideUInt -
Declaration
Swift
public var description: String { get }
View on GitHub