i would like to print data Double in swift, but output alwas 4.444444444444e+24 not real number. Can you tell me how do that?
@Skytect's answer is almost correct. It is just missing one step. Try the following code
let data1 : Double = 44444444444444444.0 let data2 : Double = 1000000.0 let data3 = data1 * data2 let numberFormatter = NumberFormatter() numberFormatter.numberStyle = .decimal let num = NSNumber(value: data3) let finalNumber = numberFormatter.string(from: num) print(finalNumber!)