 }
 
 extension UnsignedInteger where Self : FixedWidthInteger {
+  /// Returns the least common multiple of `a` and `b` and a flag to indicate
+  /// whether overflow occurred during the operation.
+  // @_transparent // @_inlineable
+  public static func lcmReportingOverflow(_ a: Self, _ b: Self)
+    -> (partialValue: Self, overflow: ArithmeticOverflow) {
+    if a == 0 || b == 0 { return (partialValue: 0, overflow: .none) }
+    return (a / Self.gcd(a, b)).multipliedReportingOverflow(by: b)
+  }
+
   /// Returns the high and low parts of the least common multiple of `a` and `b`
   /// computed using full-width arithmetic.
   // @_transparent // @_inlineable

    return (a / Self.gcd(a, b)).multipliedFullWidth(by: b)
  }
}

  /// Returns the greatest common divisor of `a` and `b`.
  // @_transparent // @_inlineable
  public static func gcd(_ a: Self, _ b: Self) -> Self {
    // An iterative version of Stein's algorithm.
    if a == 0 { return b } // gcd(0, b) == b
    if b == 0 { return a } // gcd(a, 0) == a

