Files
swift-mirror/stdlib/public/SDK
Morten Bek Ditlevsen a5a68ca25d Fix negation of 0 length Decimal (#15986)
A Decimal value with _length 0 and _isNegative set to 1 is interpreted as a NaN. The 'negate()' function however, flipped the _isNegative flag without regard for the _length 0 case. This meant that -0 would become NaN. The fix checks for the _length 0 special case. In NSDecimalSubtract() the same check was performed. Since this now happens in negate(), it is removed from the NSDecimalSubtract() function.
2018-04-18 10:18:34 -07:00
..