     }
 }
 
+@warn_unused_result
 public prefix func ~(a: BigUInt) -> BigUInt {
     return BigUInt(a.map { ~$0 })
 }
 
+@warn_unused_result
 public func | (a: BigUInt, b: BigUInt) -> BigUInt {
     var result = BigUInt()
     for i in (0 ..< max(a.count, b.count)).reverse() {


    /// Returns the remainder of `base` raised to the power `exponent` under `modulus`.
    /// - Complexity: O(exponent.count * modulus.count^2)
    public static func powmod(base: BigUInt, _ exponent: BigUInt, modulus: BigUInt) -> BigUInt {
        // https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method
        if modulus == 1 { return 0 }

public func /=(inout x: BigUInt, y: BigUInt) { x = x / y }
public func %=(inout x: BigUInt, y: BigUInt) { x = x % y }

@warn_unused_result
public func sqrt(value: BigUInt) -> BigUInt {
    // This implementation uses Newton's method.
    guard !value.isZero else { return BigUInt() }
