diff options
-rw-r--r-- | Source/Basetypes/BigDec.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Basetypes/BigDec.cs b/Source/Basetypes/BigDec.cs index feabb425..4206b2f2 100644 --- a/Source/Basetypes/BigDec.cs +++ b/Source/Basetypes/BigDec.cs @@ -88,7 +88,12 @@ namespace Microsoft.Basetypes { }
}
- return new BigDec(integral + fraction, exponent);
+ if (integral.Sign == -1) {
+ return new BigDec(integral - fraction, exponent);
+ }
+ else {
+ return new BigDec(integral + fraction, exponent);
+ }
}
internal BigDec(BIM mantissa, int exponent) {
|