_IntegerArithmetic

protocol _IntegerArithmetic

This protocol is an implementation detail of IntegerArithmetic; do not use it directly.

Its requirements are inherited by IntegerArithmetic and thus must be satisfied by types conforming to that protocol.

Inheritance View Protocol Hierarchy →
Import import Swift

Static Methods

static func addWithOverflow(_:_:) Required

Adds lhs and rhs, returning the result and a Bool that is true iff the operation caused an arithmetic overflow.

Declaration

static func addWithOverflow(_ lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
static func divideWithOverflow(_:_:) Required

Divides lhs and rhs, returning the result and a Bool that is true iff the operation caused an arithmetic overflow.

Declaration

static func divideWithOverflow(_ lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
static func multiplyWithOverflow(_:_:) Required

Multiplies lhs and rhs, returning the result and a Bool that is true iff the operation caused an arithmetic overflow.

Declaration

static func multiplyWithOverflow(_ lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
static func remainderWithOverflow(_:_:) Required

Divides lhs and rhs, returning the remainder and a Bool that is true iff the operation caused an arithmetic overflow.

Declaration

static func remainderWithOverflow(_ lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)
static func subtractWithOverflow(_:_:) Required

Subtracts lhs and rhs, returning the result and a Bool that is true iff the operation caused an arithmetic overflow.

Declaration

static func subtractWithOverflow(_ lhs: Self, _ rhs: Self) -> (Self, overflow: Bool)