This code prints "eighteen quadrillion fourteen trillion three hundred ninety-eight billion five hundred nine million four hundred eighty-one thousand nine hundred eighty-four", but the numeric value of Int.max
is 9223372036854775807
.
let formatter = NumberFormatter()
formatter.numberStyle = .spellOut
print(formatter.string(from: Int.max))
Why?