Open swift-ci opened 6 years ago
Attachment: Download
duplicates:
is duplicated by:
Issue Description:
This is easily shown by running `NSDecimalNumber(value: 10).dividing(by: 3).intValue`. It will return 0, but the expected value is 3.
`NSDecimalNumber(value: 10).dividing(by: 3).doubleValue` correctly returns `3.3333333333333335`.
Running `NSDecimalNumber(value: 10).dividing(by: 3)` in the Swift CLI will show an assertion failure which I believe to be related. - Full text attached.
The assertion is coming from LLDB, so I think that's unrelated.
@swift-ci create
Linux fix: https://github.com/apple/swift-corelibs-foundation/pull/2925
This remains a problem on macOS as of Swift 5.5 on Monterey, but that's a problem with the closed-source Foundation.
Attachment: Download
Environment
Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) on MacOS 10.13.3 (17D102)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 7432d38cca097fb412157a77bfeb51feduplicates:
is duplicated by:
Issue Description:
This is easily shown by running `NSDecimalNumber(value: 10).dividing(by: 3).intValue`. It will return 0, but the expected value is 3.
`NSDecimalNumber(value: 10).dividing(by: 3).doubleValue` correctly returns `3.3333333333333335`.
Running `NSDecimalNumber(value: 10).dividing(by: 3)` in the Swift CLI will show an assertion failure which I believe to be related. - Full text attached.