UnsignedInteger
protocol UnsignedInteger : BinaryInteger where Self.Magnitude : BinaryInteger
-
Returns the cube root of
x
, rounding toward zero.Declaration
Swift
public static func cbrt(_ x: Self) -> Self
-
Returns the greatest common divisor of
a
andb
.Declaration
Swift
public static func gcd(_ a: Self, _ b: Self) -> Self
-
Returns the least common multiple of
a
andb
.Declaration
Swift
public static func lcm(_ a: Self, _ b: Self) -> Self
-
Returns the least common multiple of
a
andb
and a flag to indicate whether overflow occurred during the operation.Declaration
Swift
public static func lcmReportingOverflow(_ a: Self, _ b: Self) -> (partialValue: Self, overflow: Bool)
-
Returns the high and low parts of the least common multiple of
a
andb
computed using full-width arithmetic.Declaration
Swift
public static func lcmFullWidth(_ a: Self, _ b: Self) -> (high: Self, low: Self.Magnitude)