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

Commit

Permalink
Updating NumberToFloatingPointBitsSlow to handle the remaining parsed…
Browse files Browse the repository at this point in the history
… fractional digits being zero. (#27688)
  • Loading branch information
tannergooding committed Nov 7, 2019
1 parent 9b2de2c commit 460b97a
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 460b97a

Please sign in to comment.