title: Integers Larger than Int64
body: <p>I'm attempting to get a user input number and find the sum of all the digits. I'm having issues with larger numbers, however, as they won't register under an Int64. Any idea as to what structures I could use to store the value? (I tried UInt64 and that didn't work very well with negatives, however, I'd prefer something larger than UInt64, anyways. I'm having a hard time implementing a UInt128 from <a href="https://stackoverflow.com/questions/25614324/is-there-a-number-type-with-bigger-capacity-than-u-long-uint64-in-swift">Is there a number type with bigger capacity than u_long/UInt64 in Swift?</a>)</p>
  
  <pre><code>import Foundation
  
  func getInteger() -&gt; Int64 {
  var value:Int64 = 0
  
  while true {
  
      //we aren't doing anything with input, so we make it a constant
      let input = readLine()
  
      //ensure its not nil
      if let unwrappedInput = input {
          if let unwrappedInt = Int64(unwrappedInput) {
              value = unwrappedInt
              break
          }
      }
      else { print("You entered a nil. Try again:") }
  }
  return value
  }
  print("Please enter an integer")
  // Gets user input
  var input = getInteger()
  var arr = [Int] ()
  var sum = 0
  var negative = false
  // If input is less than 0, makes it positive
  if input &lt; 0 {
  input = (input * -1)
  negative = true
  }
  if (input &lt; 10) &amp;&amp; (input &gt;= 1) &amp;&amp; (negative == true) {
      var remain = (-1)*(input%10)
      arr.append(Int(remain))
      input = (input/10)
  }
  else {
      var remain = (input%10)
      arr.append(Int(remain))
      input = (input/10)
  }
  }
  // Adds numbers in array to find sum of digits
  var i:Int = 0
  var size:Int = (arr.count - 1)
  while i&lt;=size {
  sum = sum + arr[i]
  i = (i+1)
  }
  // Prints sum
  print("\(sum)")
  </code></pre>