We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gcd
1 parent 8552bec commit 85264c8Copy full SHA for 85264c8
Sources/IntegerUtilities/GCD.swift
@@ -14,9 +14,9 @@
14
/// If both inputs are zero, the result is zero. If one input is zero, the
15
/// result is the absolute value of the other input.
16
///
17
-/// The resulting value must be representable within the value's type. In
18
-/// particular, the gcd of a signed, fixed-width integer type's minimum
19
-/// with itself or zero results in a value that cannot be represented:
+/// The result must be representable within its type. In particular, the gcd
+/// of a signed, fixed-width integer type's minimum with itself (or zero)
+/// cannot be represented, and results in a trap.
20
21
/// gcd(Int.min, Int.min) // Overflow error
22
/// gcd(Int.min, 0) // Overflow error
0 commit comments