Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Commit 1b7d4a1

Browse files
lewurmmarek-safar
authored andcommitted
[Number] make double 0.0 cmp more portable (#30)
Related: mono/mono#11965
1 parent c4ae516 commit 1b7d4a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Private.CoreLib/src/System/Number.Unix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private static unsafe void DoubleToNumber(double value, int precision, ref Numbe
3333
number.sign = double.IsNegative(value);
3434
*dst = '\0';
3535

36-
if (value == 0.0)
36+
if (BitConverter.DoubleToInt64Bits (value) == 0)
3737
{
3838
for (int j = 0; j < precision; j++)
3939
{

0 commit comments

Comments
 (0)