Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7650

Incorrect result adding Decimals

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Foundation
    • Labels:
      None
    • Environment:

      Linux / Swift 4.1

      Description

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

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

        Attachments

          Activity

            People

            • Assignee:
              spevans Simon Evans
              Reporter:
              niftygrifty Taylor Griffin
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: