Skip to content

[SR-7650] Incorrect result adding Decimals #3706

@swift-ci

Description

@swift-ci
Previous ID SR-7650
Radar None
Original Reporter niftygrifty (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Linux / Swift 4.1

Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug
Assignee @spevans
Priority Medium

md5: 7c55bfb750d20ffab1a5ff97a6c5ad3a

Issue Description:

`Decimal(5538) + Decimal(2880.4)` results incorrectly in 1864.8.

`NSDecimalNumber(floatLiteral: 5538).adding(NSDecimalNumber(floatLiteral: 2880.4))` produces the same incorrect result.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions