We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a OS X 10.11.4 (15E65) Ubuntu 14.04
md5: 60bfdbad742f50ecf9595cbf5c19db84
Issue Description:
Using swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a. On OS X:
Welcome to Apple Swift version 3.0-dev (LLVM dffa09ffd8, Clang 9f0d189820, Swift 1c720b8f84). Type :help for assistance. 1> import Foundation 2> let n = NSNumber(value: 0.001) n: NSNumber = Double(0.001) 3> n.description $R0: String = "0.001" 4>
On Ubuntu 14.04:
Welcome to Swift version 3.0-dev (LLVM dffa09ffd8, Clang 9f0d189820, Swift 1c720b8f84). Type :help for assistance. 1> import Foundation 2> let n = NSNumber(value:0.001) n: Foundation.NSNumber = { Foundation.NSValue = { Foundation.NSObject = {} } _base = { info = 5766 pad = 0 } _pad = 4562254508917369340 } 3> n.description $R0: String = ".001" 4>
OS X: "0.001" Linux: ".001"
The text was updated successfully, but these errors were encountered:
On Darwin the objc behavior is based on `-[NSString initWithFormat:locale:]` for NSNumber.
Sorry, something went wrong.
Is this resolved? If so, this should be closed.
Still exists on Swift 4.2
$ docker run --privileged -it --rm norionomura/swift:42 swift Welcome to Swift version 4.2 (swift-4.2-RELEASE). Type :help for assistance. 1> import Foundation 2> let n = NSNumber(value: 0.001) n: Foundation.NSNumber = { Foundation.NSValue = { Foundation.NSObject = {} } _base = { info = 832702464 pad = 8388596 } _pad = 36028746312058880 } 3> n.description $R0: String = ".001" 4>
#1724
This should be fixed now
$ cat sr_1464.swift import Foundation let n = NSNumber(value:0.001) print(n.description) $ ~/swift-DEVELOPMENT-SNAPSHOT-2018-12-07-a-ubuntu18.04/usr/bin/swift sr_1464.swift 0.001 $
No branches or pull requests
Environment
swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a
OS X 10.11.4 (15E65)
Ubuntu 14.04
Additional Detail from JIRA
md5: 60bfdbad742f50ecf9595cbf5c19db84
Issue Description:
Using swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a.
On OS X:
On Ubuntu 14.04:
OS X: "0.001"
Linux: ".001"
The text was updated successfully, but these errors were encountered: