Last active
March 18, 2016 20:04
-
-
Save zwang/17f4862ef163b954b2c5 to your computer and use it in GitHub Desktop.
Convert double to string in swift with more than default 15 decimals (a bug in swift should be fixed later)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/apple/swift/pull/348 | |
private func getDoubleStrWith16DecimalDigits(value: Double) -> String { | |
return String(format: "%.16f", value) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment