init()
init(Data)
Initializes an integer from the bits stored inside a piece of Data
. The data is assumed to be in network (big-endian) byte order with a first byte to represent the sign (0 for positive, 1 for negative)
init(UnsafeRawBufferPointer)
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer, where the first byte indicates sign (0 for positive, 1 for negative)
init<T>(T)
init<T>(T)
init(BigUInt)
Initializes a new signed big integer with the same value as the specified unsigned big integer.
init<T>(clamping: T)
init?(exactly: Decimal)
init?<T>(exactly: T)
init?<T>(exactly: T)
init(extendedGraphemeClusterLiteral: String)
Initialize a new big integer from an extended grapheme cluster. The cluster must consist of a decimal digit.
init(from: Decoder) throws
init(integerLiteral: Int64)
Initialize a new big integer from an integer literal.
init(sign: Sign, magnitude: BigUInt)
Initializes a new big integer with the provided absolute number and sign flag.
init(stringLiteral: StringLiteralType)
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. The string must contain only decimal digits.
init?(truncating: Decimal)
init<T>(truncatingIfNeeded: T)
init(unicodeScalarLiteral: UnicodeScalar)
Initialize a new big integer from a Unicode scalar. The scalar must represent a decimal digit.
init<S>(words: S)
static var isSigned: Bool
static func % (a: BigInt, b: BigInt) -> BigInt
Divide a
by b
and return the remainder. The result has the same sign as a
.
static func %= (a: inout BigInt, b: BigInt)
Divide a
by b
storing the remainder in a
.
static func & (lhs: inout BigInt, rhs: BigInt) -> BigInt
static func &<< (left: BigInt, right: BigInt) -> BigInt
static func &<<= (left: inout BigInt, right: BigInt)
static func &= (lhs: inout BigInt, rhs: BigInt)
static func &>> (left: BigInt, right: BigInt) -> BigInt
static func &>>= (left: inout BigInt, right: BigInt)
static func * (a: BigInt, b: BigInt) -> BigInt
Multiply a
with b
and return the result.
static func *= (a: inout BigInt, b: BigInt)
Multiply a
with b
in place.
static func + (a: BigInt, b: BigInt) -> BigInt
Add a
to b
and return the result.
static func += (a: inout BigInt, b: BigInt)
Add b
to a
in place.
static func - (a: BigInt, b: BigInt) -> BigInt
Subtract b
from a
and return the result.
static func -= (a: inout BigInt, b: BigInt)
Subtract b
from a
in place.
static func / (a: BigInt, b: BigInt) -> BigInt
Divide a
by b
and return the quotient. Traps if b
is zero.
static func /= (a: inout BigInt, b: BigInt)
Divide a
by b
storing the quotient in a
.
static func < (a: BigInt, b: BigInt) -> Bool
Return true iff a
is less than b
.
static func << <Other>(lhs: BigInt, rhs: Other) -> BigInt
static func <<= <Other>(lhs: inout BigInt, rhs: Other)
static func == (a: BigInt, b: BigInt) -> Bool
Return true iff a
is equal to b
.
static func >> <Other>(lhs: BigInt, rhs: Other) -> BigInt
static func >>= <Other>(lhs: inout BigInt, rhs: Other)
static func ^ (lhs: inout BigInt, rhs: BigInt) -> BigInt
static func ^= (lhs: inout BigInt, rhs: BigInt)
static func | (lhs: inout BigInt, rhs: BigInt) -> BigInt
static func |= (lhs: inout BigInt, rhs: BigInt)
static func ~ (x: BigInt) -> BigInt