Skip to content
bigearsenal edited this page May 17, 2022 · 1 revision

UInt2X

public struct UInt2X<Word:UInt1X>: Hashable, Codable 

Inheritance

BinaryInteger, Codable, Comparable, CustomDebugStringConvertible, CustomStringConvertible, ExpressibleByIntegerLiteral, ExpressibleByStringLiteral, FixedWidthInteger, Hashable, Numeric, Strideable

Nested Type Aliases

IntegerLiteralType

public typealias IntegerLiteralType = UInt64

Magnitude

public typealias Magnitude = UInt2X

Words

public typealias Words = [Word.Words.Element]

Stride

public typealias Stride = Int

Initializers

init(hi:lo:)

public init(hi:Word, lo:Word) 

init(_:)

public init(_ source:UInt2X)

init(_:)

public init(_ source: Word) 

init?(exactly:)

public init?<T>(exactly source: T) where T : BinaryInteger 

init(_:)

public init<T>(_ source: T) where T : BinaryInteger  

init?(exactly:)

public init?<T>(exactly source: T) where T : BinaryFloatingPoint 

init(_:)

public init<T>(_ source: T) where T : BinaryFloatingPoint 

init(truncatingIfNeeded:)

public init<T:BinaryInteger>(truncatingIfNeeded source: T) 

init(clamping:)

public init<T:BinaryInteger>(clamping source: T) 

init(integerLiteral:)

public init(integerLiteral value: IntegerLiteralType) 

init(stringLiteral:)

public init(stringLiteral value: StringLiteralType) 

init(_truncatingBits:)

public init(_truncatingBits bits: UInt) 

Properties

lo

public var lo:Word = 0

hi

public var hi:Word = 0

isSigned

public static var isSigned: Bool 

bitWidth

public static var bitWidth: Int 

min

public static var min:UInt2X 

max

public static var max:UInt2X 

magnitude

public var magnitude: UInt2X 

description

public var description:String 

debugDescription

public var debugDescription:String 

bitWidth

public var bitWidth: Int 

words

public var words: Words 

trailingZeroBitCount

public var trailingZeroBitCount: Int 

nonzeroBitCount

public var nonzeroBitCount: Int 

leadingZeroBitCount

public var leadingZeroBitCount: Int 

byteSwapped

public var byteSwapped: UInt2X 

Methods

addingReportingOverflow(_:)

public func addingReportingOverflow(_ other: UInt2X) -> (partialValue: UInt2X, overflow: Bool) 

addingReportingOverflow(_:)

public func addingReportingOverflow(_ other: Word) -> (partialValue: UInt2X, overflow: Bool) 

subtractingReportingOverflow(_:)

public func subtractingReportingOverflow(_ other: UInt2X) -> (partialValue: UInt2X, overflow: Bool) 

subtractingReportingOverflow(_:)

public func subtractingReportingOverflow(_ other: Word) -> (partialValue: UInt2X, overflow: Bool) 

multipliedHalfWidth(by:)

public func multipliedHalfWidth(by other: Word) -> (high: UInt2X, low: Magnitude) 

multipliedFullWidth(by:)

public func multipliedFullWidth(by other: UInt2X) -> (high: UInt2X, low: Magnitude) 

multipliedReportingOverflow(by:)

public func multipliedReportingOverflow(by other: UInt2X) -> (partialValue: UInt2X, overflow: Bool) 

rShifted(_:)

public func rShifted(_ width:Int)->UInt2X 

lShifted(_:)

public func lShifted(_ width:Int)->UInt2X 

quotientAndRemainder(dividingBy:)

public func quotientAndRemainder(dividingBy other: Word) -> (quotient: UInt2X, remainder: UInt2X) 

quotientAndRemainder(dividingBy:)

public func quotientAndRemainder(dividingBy other: UInt2X) -> (quotient: UInt2X, remainder: UInt2X) 

dividedReportingOverflow(by:)

public func dividedReportingOverflow(by other :UInt2X) -> (partialValue: UInt2X, overflow:Bool) 

remainderReportingOverflow(dividingBy:)

public func remainderReportingOverflow(dividingBy other :UInt2X) -> (partialValue: UInt2X, overflow:Bool) 

dividingFullWidth(_:)

public func dividingFullWidth(_ dividend: (high: UInt2X, low: Magnitude)) -> (quotient: UInt2X, remainder: UInt2X) 

toString(radix:uppercase:)

public func toString(radix:Int=10, uppercase:Bool=false) -> String 

distance(to:)

public func distance(to other: UInt2X) -> Int 

advanced(by:)

public func advanced(by n: Int) -> UInt2X 

Operators

==

public static func == (_ lhs: UInt2X, _ rhs: UInt2X)->Bool 

<

public static func < (lhs: UInt2X, rhs: UInt2X) -> Bool 

~

public static prefix func ~(_ value:UInt2X)->UInt2X 

+

public static prefix func +(_ value:UInt2X)->UInt2X 

-

public static prefix func -(_ value:UInt2X)->UInt2X 

&+

public static func &+(_ lhs:UInt2X, _ rhs:UInt2X)->UInt2X 

+

public static func +(_ lhs:UInt2X, _ rhs:UInt2X)->UInt2X 

+

public static func +(_ lhs:UInt2X, _ rhs:Word)->UInt2X 

+

public static func +(_ lhs:Word, _ rhs:UInt2X)->UInt2X 

+=

public static func += (lhs: inout UInt2X, rhs: UInt2X) 

+=

public static func += (lhs: inout UInt2X, rhs: Word) 

&-

public static func &-(_ lhs:UInt2X, _ rhs:UInt2X)->UInt2X 

-

public static func -(_ lhs:UInt2X, _ rhs:UInt2X)->UInt2X 

-

public static func -(_ lhs:UInt2X, _ rhs:Word)->UInt2X 

-

public static func -(_ lhs:Word, _ rhs:UInt2X)->UInt2X 

-=

public static func -= (lhs: inout UInt2X, rhs: UInt2X) 

-=

public static func -= (lhs: inout UInt2X, rhs: Word) 

&*

public static func &*(lhs: UInt2X, rhs: UInt2X) -> UInt2X 

&*

public static func &*(lhs: UInt2X, rhs: Word) -> UInt2X 

&*

public static func &*(lhs: Word, rhs: UInt2X) -> UInt2X 

*

public static func *(lhs: UInt2X, rhs: UInt2X) -> UInt2X 

*

public static func *(lhs: UInt2X, rhs: Word) -> UInt2X 

*

public static func *(lhs: Word, rhs: UInt2X) -> UInt2X 

*=

public static func *= (lhs: inout UInt2X, rhs: UInt2X) 

*=

public static func *= (lhs: inout UInt2X, rhs: Word) 

&>>

public static func &>>(_ lhs:UInt2X, _ rhs:UInt2X)->UInt2X 

&>>=

public static func &>>=(_ lhs:inout UInt2X, _ rhs:UInt2X) 

&<<

public static func &<<(_ lhs:UInt2X, _ rhs:UInt2X)->UInt2X 

&<<=

public static func &<<=(_ lhs:inout UInt2X, _ rhs:UInt2X) 

/

public static func / (_ lhs:UInt2X, rhs:UInt2X)->UInt2X 

/=

public static func /= (_ lhs:inout UInt2X, rhs:UInt2X) 

%

public static func % (_ lhs:UInt2X, rhs:UInt2X)->UInt2X 

%=

public static func %= (_ lhs:inout UInt2X, rhs:UInt2X) 

&=

public static func &= (lhs: inout UInt2X, rhs: UInt2X) 

|=

public static func |= (lhs: inout UInt2X, rhs: UInt2X) 

^=

public static func ^= (lhs: inout UInt2X<Word>, rhs: UInt2X<Word>) 

<<=

public static func <<= <RHS>(lhs: inout UInt2X<Word>, rhs: RHS) where RHS : BinaryInteger 

>>=

public static func >>= <RHS>(lhs: inout UInt2X, rhs: RHS) where RHS : BinaryInteger 
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Operators
Extensions
Clone this wiki locally