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:5.0 - linux; amd64 Swift Docker image from https://hub.docker.com/_/swift Image ID: sha256:9dc0d914ebd9aaece2c1a626c719a7dace83fbbca0868fca59da9ae49ac02a17
md5: 3d6a1b043fcdcdcab5834ad68f23cbd7
Issue Description:
I have the following code in test case:
let decimalNumber = NSDecimalNumber(string: "0.022829306361065572").multiplying(byPowerOf10: 18).stringValue XCTAssertEqual(decimalNumber, "22829306361065572")
It works fine on macOS but on Linux environment it gives me totally different results:
XCTAssertEqual failed: ("0.00000000000000000000000000000283706242508673928433299258214568592438") is not equal to ("22829306361065572")
So it looks like on Linux Foundation it using multiplying(powerOf10: -18).
The text was updated successfully, but these errors were encountered:
#2418
Sorry, something went wrong.
Comment by Dominique Stranz (JIRA)
Fixed by @spevans and merged to master. Thanks 👍
spevans
No branches or pull requests
Environment
swift:5.0 - linux; amd64
Swift Docker image from https://hub.docker.com/_/swift
Image ID: sha256:9dc0d914ebd9aaece2c1a626c719a7dace83fbbca0868fca59da9ae49ac02a17
Additional Detail from JIRA
md5: 3d6a1b043fcdcdcab5834ad68f23cbd7
Issue Description:
I have the following code in test case:
It works fine on macOS but on Linux environment it gives me totally different results:
So it looks like on Linux Foundation it using multiplying(powerOf10: -18).
The text was updated successfully, but these errors were encountered: