Post not yet marked as solved
Post marked as unsolved with 8 replies, 1,963 views
Please tell me if I'm missing something here - run these three lines of code in Playground: import UIKit let numberFormatter = NumberFormatter() let myformattedNumber="\(numberFormatter.string(from: NSNumber(value:10660066111620287))!)"gives me this output for myformattedNumber: "10660066111620288"See the difference of 7 vs 8. Anybody can tell me what is going on here..?(I found that problem in my app and first thought I had a bug in my algorithm, but the above is where the problem sits. I do need the formatting - related code ommitted here so as to not distract from the issue, so please don't suggest to just not use the formatter 🙂)