 
     func testModularExponentiation() {
         let m15 = (BigUInt(1) << 1279) - BigUInt(1)
-        let tests = (1..<25).map { _ in BigUInt.randomIntegerWithMaximumWidth(1279) }
+        let tests = (1..<25).map { _ in BigUInt.randomInteger(withMaximumWidth: 1279) }
         self.measure {
             for test in tests {
                 assert(test < m15)

    }

    func testSquareRoot() {
        var numbers: [BigUInt] = (1...1000).map { _ in BigUInt.randomIntegerWithMaximumWidth(60 * sizeof(Digit) * 8) }
        var roots: [BigUInt] = []
        self.measure {
            roots.removeAll()

        self.measure {
            fact = BigUInt(1)
            for i in 1...n {
                fact.multiply(byDigit: Digit(i))
            }
        }
        checkFactorial(fact: fact, n: n)
