Skip to content

Commit

Permalink
Updating NumberToFloatingPointBitsSlow to handle the remaining parsed…
Browse files Browse the repository at this point in the history
… fractional digits being zero. (dotnet/coreclr#27688)

Commit migrated from dotnet/coreclr@460b97a
  • Loading branch information
tannergooding authored Nov 7, 2019
1 parent e83e9ff commit 9b296ee
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,16 @@ private static ulong NumberToFloatingPointBitsSlow(ref NumberBuffer number, in F
}

AccumulateDecimalDigitsIntoBigInteger(ref number, fractionalFirstIndex, fractionalLastIndex, out BigInteger fractionalNumerator);
Debug.Assert(!fractionalNumerator.IsZero());

if (fractionalNumerator.IsZero())
{
return ConvertBigIntegerToFloatingPointBits(
ref integerValue,
in info,
integerBitsOfPrecision,
fractionalDigitsPresent != 0
);
}

BigInteger.Pow10(fractionalDenominatorExponent, out BigInteger fractionalDenominator);

Expand Down

0 comments on commit 9b296ee

Please sign in to comment.