Thank you for this post and the fix in 4.1.3. There seems to be a related problem with NumberFormatter(). When converting the result of a Decimal calculation that results in 0.0. NumberFormatter().string(from:Decimal) returns the last element of the calc rather than 0.00. This happens in 4.1.3 and 4.2 Linux, but works fine in Mac OS. I'm trying to generate order acknowledgements and its important for calculation results to be displayed accurately and properly formatted. It seems that a zero calculated result is the only problem (but not sure and concerned). A workaround is to test for a zero result and then fix the string output. Please let me know if I'm doing something wrong. Thanks!

Here is a simple test script that can be run on Mac OS and Linux with different results:

```
#!/usr/bin/swift
import Foundation
print("Simple Test\nDecimal\t\tFormatted")
let nf = NumberFormatter()
nf.locale = Locale(identifier: "en_US")
nf.numberStyle = .decimal
nf.minimumFractionDigits = 2
nf.maximumFractionDigits = 2
let x = Decimal(10.5)
let y = Decimal(9.0)
let z = Decimal(1.5)
let a = x - y - z
let b = x - z - y
print("x=Decimal(10.5):Formatted \(nf.string(from: NSDecimalNumber(decimal:x)) ?? "")")
print("y=Decimal(9.0):\tFormatted \(nf.string(from: NSDecimalNumber(decimal:y)) ?? "")")
print("z=Decimal(1.5):\tFormatted \(nf.string(from: NSDecimalNumber(decimal:z)) ?? "")")
print("x - y - z = \(a):\tFormatted \(nf.string(from: NSDecimalNumber(decimal:a)) ?? "")")
print("x - z - y = \(b):\tFormatted \(nf.string(from: NSDecimalNumber(decimal:b)) ?? "")")
print("Possible Workaround?")
print("\\(b==Decimal(0.0) ? (nf.string(from: NSDecimalNumber(decimal:Decimal(0.0))) ?? \"\"):(nf.string(from: NSDecimalNumber(decimal:b)) ?? \"\"))")
print("Result \(b==Decimal(0.0) ? (nf.string(from: NSDecimalNumber(decimal:Decimal(0.0))) ?? ""):(nf.string(from: NSDecimalNumber(decimal:b)) ?? ""))")
```

Results - Docker Official - Swift 4.2 ubuntu:16.04

```
Simple Test
Decimal Formatted
x=Decimal(10.5):Formatted 10.50
y=Decimal(9.0): Formatted 9.00
z=Decimal(1.5): Formatted 1.50
x - y - z = 0: Formatted 1.50
x - z - y = 0: Formatted 9.00
Possible Workaround?
\(b==Decimal(0.0) ? (nf.string(from: NSDecimalNumber(decimal:Decimal(0.0))) ?? ""):(nf.string(from: NSDecimalNumber(decimal:b)) ?? ""))
Result 0.00
```

Results Swift 4.1.2 MacOS 10.13.6

```
Simple Test
Decimal Formatted
x=Decimal(10.5):Formatted 10.50
y=Decimal(9.0): Formatted 9.00
z=Decimal(1.5): Formatted 1.50
x - y - z = 0: Formatted 0.00
x - z - y = 0: Formatted 0.00
Possible Workaround?
\(b==Decimal(0.0) ? (nf.string(from: NSDecimalNumber(decimal:Decimal(0.0))) ?? ""):(nf.string(from: NSDecimalNumber(decimal:b)) ?? ""))
Result 0.00
```