[SR-7236] NSDecimalNumber .intValue
reporting 0 on numbers with many decimals
#4037
Labels
.intValue
reporting 0 on numbers with many decimals
#4037
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
md5: 7432d38cca097fb412157a77bfeb51fe
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 text was updated successfully, but these errors were encountered: