I have mobile bank app. When user type amount, then convert string to double i have problem user typed amount example "8.7" is 8.699999999999999 and when i send request it sending 8.699999999999999 what can i do, to fix it?
I have tried this post:
swift: issue in converting string to double
var amount = "8.7" var amountDouble = Double(amount)!
var amount = "8.7" . //"8.7" var amountDouble = Double(amount)! //8.699999999999999