Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanner Gooding <tagoo@outlook.com>2018-09-07 03:49:47 +0300
committerJan Kotas <jkotas@microsoft.com>2018-09-07 06:33:14 +0300
commit5e8dadde4b663494f934c03c03fdf4dfe5969ee4 (patch)
treedf594d7d440c48149350909ed4b4354161d5ab29
parentaac68859756fb4eb8da80474eeed6d772fe6c0d7 (diff)
Updating Number.Unix to properly set the sign of -0.0
-rw-r--r--src/System.Private.CoreLib/src/System/Number.Unix.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/System.Private.CoreLib/src/System/Number.Unix.cs b/src/System.Private.CoreLib/src/System/Number.Unix.cs
index 909ca6a6e..f02a788f7 100644
--- a/src/System.Private.CoreLib/src/System/Number.Unix.cs
+++ b/src/System.Private.CoreLib/src/System/Number.Unix.cs
@@ -30,14 +30,9 @@ namespace System
char* dst = number.digits;
number.scale = 0;
- number.sign = false;
+ number.sign = double.IsNegative(value);
*dst = '\0';
- if (value < 0.0)
- {
- number.sign = true;
- }
-
if (value == 0.0)
{
for (int j = 0; j < precision; j++)