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

Commit

Permalink
[Number] make double 0.0 cmp more portable (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewurm authored and marek-safar committed Jan 31, 2019
1 parent c4ae516 commit 1b7d4a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/System.Private.CoreLib/src/System/Number.Unix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static unsafe void DoubleToNumber(double value, int precision, ref Numbe
number.sign = double.IsNegative(value);
*dst = '\0';

if (value == 0.0)
if (BitConverter.DoubleToInt64Bits (value) == 0)
{
for (int j = 0; j < precision; j++)
{
Expand Down

0 comments on commit 1b7d4a1

Please sign in to comment.