{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/40770554","id":40770554,"diff_hunk":"@@ -0,0 +1,783 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+using System;\n+using System.Diagnostics;\n+using System.Numerics;\n+using System.Runtime.InteropServices;\n+using System.Text;\n+\n+namespace Microsoft.CodeAnalysis\n+{\n+    /// <summary>\n+    /// A set of utilities for converting from a decimal floating-point literal string to its IEEE float\n+    /// or double representation, which coniders all digits signficant and correctly rounds according to\n+    /// the IEEE round-to-nearest-ties-to-even mode.\n+    /// \n+    /// If you change this code, please run the set of long-running random tests in the solution\n+    /// RandomRealParserTests.sln. That solution is not included in Roslyn.sln as it is Windows-specific.\n+    /// </summary>\n+    internal static class RealParser\n+    {\n+        /// <summary>\n+        /// Try parsing a correctly-formatted double floating-point literal into the nearest representable double\n+        /// using IEEE round-to-nearest-ties-to-even rounding mode. Behavior is not defined for inputs that are\n+        /// not valid C# floating-point literals.\n+        /// </summary>\n+        /// <param name=\"s\">The decimal floating-point constant's string</param>\n+        /// <param name=\"d\">The nearest double value, if conversion succeeds</param>\n+        /// <returns>True of the input was converted; false if there was an overflow</returns>\n+        public static bool TryParseDouble(string s, out double d)\n+        {\n+            var str = DecimalFloatingPointString.FromSource(s);\n+            var dbl = DoubleFloatingPointType.Instance;\n+            ulong result;\n+            var status = RealParser.ConvertDecimalToFloatingPointBits(str, dbl, out result);\n+            d = BitConverter.Int64BitsToDouble((long)result);\n+            return status != SLD_STATUS.SLD_OVERFLOW;\n+        }\n+\n+        /// <summary>\n+        /// Try parsing a correctly-formatted float floating-point literal into the nearest representable float\n+        /// using IEEE round-to-nearest-ties-to-even rounding mode. Behavior is not defined for inputs that are\n+        /// not valid C# floating-point literals.\n+        /// </summary>\n+        /// <param name=\"s\">The float floating-point constant's string</param>\n+        /// <param name=\"f\">The nearest float value, if conversion succeeds</param>\n+        /// <returns>True of the input was converted; false if there was an overflow</returns>\n+        public static bool TryParseFloat(string s, out float f)\n+        {\n+            var str = DecimalFloatingPointString.FromSource(s);\n+            var dbl = FloatFloatingPointType.Instance;\n+            ulong result;\n+            var status = RealParser.ConvertDecimalToFloatingPointBits(str, dbl, out result);\n+            f = Int32BitsToFloat((uint)result);\n+            return status != SLD_STATUS.SLD_OVERFLOW;\n+        }\n+\n+        private static BigInteger BigZero = BigInteger.Zero;\n+        private static BigInteger BigOne = new BigInteger(1);\n+        private static BigInteger BigTwo = new BigInteger(2);\n+        private static BigInteger BigTen = new BigInteger(10);\n+\n+        /// <summary>\n+        /// Properties of an IEEE floating-point representation.\n+        /// </summary>\n+        private abstract class FloatingPointType\n+        {\n+            public abstract ushort DenormalMantissaBits { get; }\n+            public ushort NormalMantissaBits => (ushort)(DenormalMantissaBits + 1); // we get an extra (hidden) bit for normal mantissas\n+            public abstract ushort ExponentBits { get; }\n+            public int MinBinaryExponent => 1 - MaxBinaryExponent;\n+            public abstract int MaxBinaryExponent { get; }\n+            public int OverflowDecimalExponent => (MaxBinaryExponent + 2 * NormalMantissaBits) / 3;\n+            public abstract int ExponentBias { get; }\n+            public ulong DenormalMantissaMask => (1UL << (DenormalMantissaBits)) - 1;\n+            public ulong NormalMantissaMask => (1UL << NormalMantissaBits) - 1;\n+            public abstract ulong Zero { get; }\n+            public abstract ulong Infinity { get; }\n+\n+            /// <summary>\n+            /// Converts the floating point value 0.mantissa * 2^exponent into the  \n+            /// correct form for the FloatingPointType and stores the bits of the resulting value  \n+            /// into the result object.  \n+            /// The caller must ensure that the mantissa and exponent are correctly computed  \n+            /// such that either [1] the most significant bit of the mantissa is in the  \n+            /// correct position for the FloatingType, or [2] the exponent has been correctly  \n+            /// adjusted to account for the shift of the mantissa that will be required.  \n+            ///  \n+            /// This function correctly handles range errors and stores a zero or infinity in  \n+            /// the result object on underflow and overflow errors, respectively.  This  \n+            /// function correctly forms denormal numbers when required.  \n+            ///  \n+            /// If the provided mantissa has more bits of precision than can be stored in the  \n+            /// result object, the mantissa is rounded to the available precision.  Thus, if  \n+            /// possible, the caller should provide a mantissa with at least one more bit of  \n+            /// precision than is required, to ensure that the mantissa is correctly rounded.  \n+            /// (The caller should not round the mantissa before calling this function.)  \n+            /// </summary>\n+            /// <param name=\"initialMantissa\">The bits of the mantissa</param>\n+            /// <param name=\"initialExponent\">The exponent</param>\n+            /// <param name=\"hasZeroTail\">Whether there are any nonzero bits past the supplied mantissa</param>\n+            /// <param name=\"result\">Where the bits of the floating-point number are stored</param>\n+            /// <returns>A status indicating whether the conversion succeeded and why</returns>\n+            public SLD_STATUS AssembleFloatingPointValue(\n+                ulong initialMantissa,\n+                int initialExponent,\n+                bool hasZeroTail,\n+                out ulong result)\n+            {\n+                // number of bits by which we must adjust the mantissa to shift it into the  \n+                // correct position, and compute the resulting base two exponent for the  \n+                // normalized mantissa:  \n+                uint initialMantissaBits = CountSignificantBits(initialMantissa);\n+                int normalMantissaShift = this.NormalMantissaBits - (int)initialMantissaBits;\n+                int normalExponent = initialExponent - normalMantissaShift;\n+\n+                ulong mantissa = initialMantissa;\n+                int exponent = normalExponent;\n+\n+                if (normalExponent > this.MaxBinaryExponent)\n+                {\n+                    // The exponent is too large to be represented by the floating point  \n+                    // type; report the overflow condition:\n+                    result = this.Infinity;\n+                    return SLD_STATUS.SLD_OVERFLOW;\n+                }\n+                else if (normalExponent < this.MinBinaryExponent)\n+                {\n+                    // The exponent is too small to be represented by the floating point  \n+                    // type as a normal value, but it may be representable as a denormal  \n+                    // value.  Compute the number of bits by which we need to shift the  \n+                    // mantissa in order to form a denormal number.  (The subtraction of  \n+                    // an extra 1 is to account for the hidden bit of the mantissa that  \n+                    // is not available for use when representing a denormal.)  \n+                    int denormalMantissaShift =\n+                        normalMantissaShift +\n+                        normalExponent +\n+                        this.ExponentBias -\n+                        1;\n+\n+                    // Denormal values have an exponent of zero, so the debiased exponent is  \n+                    // the negation of the exponent bias:  \n+                    exponent = -this.ExponentBias;\n+\n+                    if (denormalMantissaShift < 0)\n+                    {\n+                        // Use two steps for right shifts:  for a shift of N bits, we first  \n+                        // shift by N-1 bits, then shift the last bit and use its value to  \n+                        // round the mantissa.  \n+                        mantissa = RightShiftWithRounding(mantissa, -denormalMantissaShift, hasZeroTail);\n+\n+                        // If the mantissa is now zero, we have underflowed:  \n+                        if (mantissa == 0)\n+                        {\n+                            result = this.Zero;\n+                            return SLD_STATUS.SLD_UNDERFLOW;\n+                        }\n+\n+                        // When we round the mantissa, the result may be so large that the  \n+                        // number becomes a normal value.  For example, consider the single  \n+                        // precision case where the mantissa is 0x01ffffff and a right shift  \n+                        // of 2 is required to shift the value into position. We perform the  \n+                        // shift in two steps:  we shift by one bit, then we shift again and  \n+                        // round using the dropped bit.  The initial shift yields 0x00ffffff.  \n+                        // The rounding shift then yields 0x007fffff and because the least  \n+                        // significant bit was 1, we add 1 to this number to round it.  The  \n+                        // final result is 0x00800000.  \n+                        //  \n+                        // 0x00800000 is 24 bits, which is more than the 23 bits available  \n+                        // in the mantissa.  Thus, we have rounded our denormal number into  \n+                        // a normal number.  \n+                        //  \n+                        // We detect this case here and re-adjust the mantissa and exponent  \n+                        // appropriately, to form a normal number:  \n+                        if (mantissa > this.DenormalMantissaMask)\n+                        {\n+                            // We add one to the denormal_mantissa_shift to account for the  \n+                            // hidden mantissa bit (we subtracted one to account for this bit  \n+                            // when we computed the denormal_mantissa_shift above).  \n+                            exponent =\n+                                initialExponent -\n+                                (denormalMantissaShift + 1) -\n+                                normalMantissaShift;\n+                        }\n+                    }\n+                    else\n+                    {\n+                        mantissa <<= denormalMantissaShift;\n+                    }\n+                }\n+                else\n+                {\n+                    if (normalMantissaShift < 0)\n+                    {\n+                        // Use two steps for right shifts:  for a shift of N bits, we first  \n+                        // shift by N-1 bits, then shift the last bit and use its value to  \n+                        // round the mantissa.  \n+                        mantissa = RightShiftWithRounding(mantissa, -normalMantissaShift, hasZeroTail);\n+\n+                        // When we round the mantissa, it may produce a result that is too  \n+                        // large.  In this case, we divide the mantissa by two and increment  \n+                        // the exponent (this does not change the value).  \n+                        if (mantissa > this.NormalMantissaMask)\n+                        {\n+                            mantissa >>= 1;\n+                            ++exponent;\n+\n+                            // The increment of the exponent may have generated a value too  \n+                            // large to be represented.  In this case, report the overflow:  \n+                            if (exponent > this.MaxBinaryExponent)\n+                            {\n+                                result = this.Infinity;\n+                                return SLD_STATUS.SLD_OVERFLOW;\n+                            }\n+                        }\n+                    }\n+                    else if (normalMantissaShift > 0)\n+                    {\n+                        mantissa <<= normalMantissaShift;\n+                    }\n+                }\n+\n+                // Unset the hidden bit in the mantissa and assemble the floating point value  \n+                // from the computed components:  \n+                mantissa &= this.DenormalMantissaMask;\n+\n+                Debug.Assert((DenormalMantissaMask & (1UL << DenormalMantissaBits)) == 0);\n+                ulong shiftedExponent = ((ulong)(exponent + this.ExponentBias)) << DenormalMantissaBits;\n+                Debug.Assert((shiftedExponent & DenormalMantissaMask) == 0);\n+                Debug.Assert((mantissa & ~DenormalMantissaMask) == 0);\n+                Debug.Assert((shiftedExponent & ~(((1UL << this.ExponentBits) - 1) << DenormalMantissaBits)) == 0); // exponent fits in its place\n+                result = shiftedExponent | mantissa;\n+                return SLD_STATUS.SLD_OK;\n+            }\n+        }\n+\n+        /// <summary>\n+        /// Properties of a C# float.\n+        /// </summary>\n+        private class FloatFloatingPointType : FloatingPointType\n+        {\n+            public static FloatFloatingPointType Instance = new FloatFloatingPointType();\n+            private FloatFloatingPointType() { }\n+            public override ushort DenormalMantissaBits => 23;\n+            public override ushort ExponentBits => 8;\n+            public override int MaxBinaryExponent => 127;\n+            public override int ExponentBias => 127;\n+            public override ulong Zero => FloatToInt32Bits(0.0f);\n+            public override ulong Infinity => FloatToInt32Bits(1.0f / 0.0f);\n+        }\n+\n+        /// <summary>\n+        /// Properties of a C# double.\n+        /// </summary>\n+        private class DoubleFloatingPointType : FloatingPointType\n+        {\n+            public static DoubleFloatingPointType Instance = new DoubleFloatingPointType();\n+            private DoubleFloatingPointType() { }\n+            public override ushort DenormalMantissaBits => 52;\n+            public override ushort ExponentBits => 11;\n+            public override int MaxBinaryExponent => 1023;\n+            public override int ExponentBias => 1023;\n+            public override ulong Zero => (ulong)BitConverter.DoubleToInt64Bits(0.0d);\n+            public override ulong Infinity => (ulong)BitConverter.DoubleToInt64Bits(1.0d / 0.0d);\n+        }\n+\n+        /// <summary>\n+        /// This type is used to hold a partially-parsed string representation of a  \n+        /// floating point number.  The number is stored in the following form:  \n+        ///  <pre>\n+        ///     0.Mantissa * 10^Exponent\n+        ///  </pre>\n+        /// The Mantissa buffer stores the mantissa digits as characters in a string.  \n+        /// The MantissaCount gives the number of digits present in the Mantissa buffer.\n+        /// There shall be neither leading nor trailing zero digits in the Mantissa.\n+        /// </summary>\n+        [DebuggerDisplay(\"0.{Mantissa}e{Exponent}\")]\n+        private struct DecimalFloatingPointString\n+        {\n+            public int Exponent;\n+            public string Mantissa;\n+            public uint MantissaCount => (uint)Mantissa.Length;\n+\n+            /// <summary>\n+            /// Create a DecimalFloatingPointString from a string representing a floating-point literal.\n+            /// </summary>\n+            /// <param name=\"source\">The text of the floating-point literal</param>\n+            public static DecimalFloatingPointString FromSource(string source)\n+            {\n+                var mantissaBuilder = new StringBuilder();\n+                var exponent = 0;\n+                int i = 0;\n+                while (i < source.Length && source[i] == '0') i++;\n+                int skippedDecimals = 0;\n+                while (i < source.Length && source[i] >= '0' && source[i] <= '9')\n+                {\n+                    if (source[i] == '0')\n+                    {\n+                        skippedDecimals++;\n+                    }\n+                    else\n+                    {\n+                        mantissaBuilder.Append('0', skippedDecimals);\n+                        skippedDecimals = 0;\n+                        mantissaBuilder.Append(source[i]);\n+                    }\n+                    exponent++;\n+                    i++;\n+                }\n+                if (i < source.Length && source[i] == '.')\n+                {\n+                    i++;\n+                    while (i < source.Length && source[i] >= '0' && source[i] <= '9')\n+                    {\n+                        if (source[i] == '0')\n+                        {\n+                            skippedDecimals++;\n+                        }\n+                        else\n+                        {\n+                            mantissaBuilder.Append('0', skippedDecimals);\n+                            skippedDecimals = 0;\n+                            mantissaBuilder.Append(source[i]);\n+                        }\n+                        i++;\n+                    }\n+                }\n+                var result = default(DecimalFloatingPointString);\n+                result.Mantissa = mantissaBuilder.ToString();\n+                if (i < source.Length && (source[i] == 'e' || source[i] == 'E'))\n+                {\n+                    char exponentSign = '\\0';\n+                    i++;\n+                    if (i < source.Length && (source[i] == '-' || source[i] == '+'))\n+                    {\n+                        exponentSign = source[i];\n+                        i++;\n+                    }\n+                    int firstExponent = i;\n+                    int lastExponent = i;\n+                    while (i < source.Length && source[i] >= '0' && source[i] <= '9') lastExponent = ++i;\n+                    int exponentMagnitude = int.Parse(source.Substring(firstExponent, lastExponent - firstExponent));\n+                    if (exponentSign == '-')\n+                    {\n+                        exponent -= exponentMagnitude;\n+                    }\n+                    else\n+                    {\n+                        exponent += exponentMagnitude;\n+                    }\n+                }\n+                result.Exponent = exponent;\n+                return result;\n+            }\n+        }\n+\n+        private enum SLD_STATUS\n+        {\n+            SLD_OK,\n+            SLD_NODIGITS,\n+            SLD_UNDERFLOW,\n+            SLD_OVERFLOW\n+        }\n+\n+        /// <summary>\n+        /// Convert a DecimalFloatingPointString to the bits of the given floating-point type.\n+        /// </summary>\n+        private static SLD_STATUS ConvertDecimalToFloatingPointBits(DecimalFloatingPointString data, FloatingPointType type, out ulong result)\n+        {\n+            if (data.Mantissa.Length == 0)\n+            {\n+                result = type.Zero;\n+                return SLD_STATUS.SLD_NODIGITS;\n+            }\n+\n+            // To generate an N bit mantissa we require N + 1 bits of precision.  The  \n+            // extra bit is used to correctly round the mantissa (if there are fewer bits  \n+            // than this available, then that's totally okay; in that case we use what we  \n+            // have and we don't need to round).\n+            uint requiredBitsOfPrecision = (uint)type.NormalMantissaBits + 1;\n+\n+            // The input is of the form 0.Mantissa x 10^Exponent, where 'Mantissa' are  \n+            // the decimal digits of the mantissa and 'Exponent' is the decimal exponent.  \n+            // We decompose the mantissa into two parts: an integer part and a fractional  \n+            // part.  If the exponent is positive, then the integer part consists of the  \n+            // first 'exponent' digits, or all present digits if there are fewer digits.  \n+            // If the exponent is zero or negative, then the integer part is empty.  In  \n+            // either case, the remaining digits form the fractional part of the mantissa.  \n+            uint positiveExponent = (uint)Math.Max(0, data.Exponent);\n+            uint integerDigitsPresent = Math.Min(positiveExponent, data.MantissaCount);\n+            uint integerDigitsMissing = positiveExponent - integerDigitsPresent;\n+            uint integerFirstIndex = 0;\n+            uint integerLastIndex = integerDigitsPresent;\n+\n+            uint fractionalFirstIndex = integerLastIndex;\n+            uint fractionalLastIndex = data.MantissaCount;\n+            uint fractionalDigitsPresent = fractionalLastIndex - fractionalFirstIndex;\n+\n+            // First, we accumulate the integer part of the mantissa into a big_integer:\n+            BigInteger integerValue = AccumulateDecimalDigitsIntoBigInteger(data, integerFirstIndex, integerLastIndex);\n+\n+            if (integerDigitsMissing > 0)\n+            {\n+                if (integerDigitsMissing > type.OverflowDecimalExponent)\n+                {\n+                    result = type.Infinity;\n+                    return SLD_STATUS.SLD_OVERFLOW;\n+                }\n+\n+                MultiplyByPowerOfTen(ref integerValue, integerDigitsMissing);\n+            }\n+\n+            // At this point, the integer_value contains the value of the integer part\n+            // of the mantissa.  If either [1] this number has more than the required\n+            // number of bits of precision or [2] the mantissa has no fractional part,\n+            // then we can assemble the result immediately:\n+            byte[] integerValueAsBytes;\n+            uint integerBitsOfPrecision = CountSignificantBits(integerValue, out integerValueAsBytes);\n+            if (integerBitsOfPrecision >= requiredBitsOfPrecision ||\n+                fractionalDigitsPresent == 0)\n+            {\n+                return ConvertBigIntegerToFloatingPointBits(\n+                    integerValueAsBytes,\n+                    integerBitsOfPrecision,\n+                    fractionalDigitsPresent != 0,\n+                    type,\n+                    out result);\n+            }\n+\n+            // Otherwise, we did not get enough bits of precision from the integer part,  \n+            // and the mantissa has a fractional part.  We parse the fractional part of  \n+            // the mantsisa to obtain more bits of precision.  To do this, we convert  \n+            // the fractional part into an actual fraction N/M, where the numerator N is  \n+            // computed from the digits of the fractional part, and the denominator M is   \n+            // computed as the power of 10 such that N/M is equal to the value of the  \n+            // fractional part of the mantissa.  \n+\n+            uint fractionalDenominatorExponent = data.Exponent < 0\n+                ? fractionalDigitsPresent + (uint)-data.Exponent\n+                : fractionalDigitsPresent;\n+            if (integerBitsOfPrecision == 0 && (fractionalDenominatorExponent - (int)data.MantissaCount) > type.OverflowDecimalExponent)\n+            {\n+                // If there were any digits in the integer part, it is impossible to  \n+                // underflow (because the exponent cannot possibly be small enough),  \n+                // so if we underflow here it is a true underflow and we return zero.  \n+                result = type.Zero;\n+                return SLD_STATUS.SLD_UNDERFLOW;\n+            }\n+\n+            BigInteger fractionalNumerator = AccumulateDecimalDigitsIntoBigInteger(data, fractionalFirstIndex, fractionalLastIndex);\n+            Debug.Assert(!fractionalNumerator.IsZero);\n+\n+            BigInteger fractionalDenominator = BigOne;\n+            MultiplyByPowerOfTen(ref fractionalDenominator, fractionalDenominatorExponent);\n+\n+            // Because we are using only the fractional part of the mantissa here, the  \n+            // numerator is guaranteed to be smaller than the denominator.  We normalize  \n+            // the fraction such that the most significant bit of the numerator is in  \n+            // the same position as the most significant bit in the denominator.  This  \n+            // ensures that when we later shift the numerator N bits to the left, we  \n+            // will produce N bits of precision.  \n+            uint fractionalNumeratorBits = CountSignificantBits(fractionalNumerator);\n+            uint fractionalDenominatorBits = CountSignificantBits(fractionalDenominator);\n+\n+            uint fractionalShift = fractionalDenominatorBits > fractionalNumeratorBits\n+                ? fractionalDenominatorBits - fractionalNumeratorBits\n+                : 0;\n+\n+            if (fractionalShift > 0)\n+            {\n+                ShiftLeft(ref fractionalNumerator, fractionalShift);\n+            }\n+\n+            uint requiredFractionalBitsOfPrecision =\n+                requiredBitsOfPrecision -\n+                integerBitsOfPrecision;\n+\n+            uint remainingBitsOfPrecisionRequired = requiredFractionalBitsOfPrecision;\n+            if (integerBitsOfPrecision > 0)\n+            {\n+                // If the fractional part of the mantissa provides no bits of precision  \n+                // and cannot affect rounding, we can just take whatever bits we got from  \n+                // the integer part of the mantissa.  This is the case for numbers like  \n+                // 5.0000000000000000000001, where the significant digits of the fractional  \n+                // part start so far to the right that they do not affect the floating  \n+                // point representation.  \n+                //  \n+                // If the fractional shift is exactly equal to the number of bits of  \n+                // precision that we require, then no fractional bits will be part of the  \n+                // result, but the result may affect rounding.  This is e.g. the case for  \n+                // large, odd integers with a fractional part greater than or equal to .5.  \n+                // Thus, we need to do the division to correctly round the result.  \n+                if (fractionalShift > remainingBitsOfPrecisionRequired)\n+                {\n+                    return ConvertBigIntegerToFloatingPointBits(\n+                        integerValueAsBytes,\n+                        integerBitsOfPrecision,\n+                        fractionalDigitsPresent != 0,\n+                        type,\n+                        out result);\n+                }\n+\n+                remainingBitsOfPrecisionRequired -= fractionalShift;\n+            }\n+\n+            // If there was no integer part of the mantissa, we will need to compute the  \n+            // exponent from the fractional part.  The fractional exponent is the power  \n+            // of two by which we must multiply the fractional part to move it into the  \n+            // range [1.0, 2.0).  This will either be the same as the shift we computed  \n+            // earlier, or one greater than that shift:  \n+            uint fractionalExponent = fractionalNumerator < fractionalDenominator\n+                ? fractionalShift + 1\n+                : fractionalShift;\n+\n+            ShiftLeft(ref fractionalNumerator, remainingBitsOfPrecisionRequired);\n+            BigInteger fractionalRemainder;\n+            BigInteger bigFractionalMantissa = BigInteger.DivRem(fractionalNumerator, fractionalDenominator, out fractionalRemainder);\n+            ulong fractionalMantissa = (ulong)bigFractionalMantissa;\n+\n+            bool hasZeroTail = fractionalRemainder.IsZero;\n+\n+            // We may have produced more bits of precision than were required.  Check,  \n+            // and remove any \"extra\" bits:  \n+            uint fractionalMantissaBits = CountSignificantBits(fractionalMantissa);\n+            if (fractionalMantissaBits > requiredFractionalBitsOfPrecision)\n+            {\n+                int shift = (int)(fractionalMantissaBits - requiredFractionalBitsOfPrecision);\n+                hasZeroTail = hasZeroTail && (fractionalMantissa & ((1UL << shift) - 1)) == 0;\n+                fractionalMantissa >>= shift;\n+            }\n+\n+            // Compose the mantissa from the integer and fractional parts:  \n+            Debug.Assert(integerBitsOfPrecision < 60); // we can use BigInteger's built-in conversion\n+            ulong integerMantissa = (ulong)integerValue;\n+\n+            ulong completeMantissa =\n+                (integerMantissa << (int)requiredFractionalBitsOfPrecision) +\n+                fractionalMantissa;\n+\n+            // Compute the final exponent:  \n+            // * If the mantissa had an integer part, then the exponent is one less than  \n+            //   the number of bits we obtained from the integer part.  (It's one less  \n+            //   because we are converting to the form 1.11111, with one 1 to the left  \n+            //   of the decimal point.)  \n+            // * If the mantissa had no integer part, then the exponent is the fractional  \n+            //   exponent that we computed.  \n+            // Then, in both cases, we subtract an additional one from the exponent, to  \n+            // account for the fact that we've generated an extra bit of precision, for  \n+            // use in rounding.  \n+            int finalExponent = integerBitsOfPrecision > 0\n+                ? (int)integerBitsOfPrecision - 2\n+                : -(int)(fractionalExponent) - 1;\n+\n+            return type.AssembleFloatingPointValue(completeMantissa, finalExponent, hasZeroTail, out result);\n+        }\n+\n+        /// <summary>\n+        /// This function is part of the fast track for integer floating point strings.  \n+        /// It takes an integer stored as an array of bytes (lsb first) and converts the value into its FloatingType  \n+        /// representation, storing the bits into \"result\".  If the value is not  \n+        /// representable, +/-infinity is stored and overflow is reported (since this  \n+        /// function only deals with integers, underflow is impossible).  \n+        /// </summary>\n+        /// <param name=\"integerValueAsBytes\">the bits of the integer, least significant bits first</param>\n+        /// <param name=\"integerBitsOfPrecision\">the number of bits of precision in integerValueAsBytes</param>\n+        /// <param name=\"hasNonzeroFractionalPart\">whether there are nonzero digits after the decimal</param>\n+        /// <param name=\"type\">the kind of real number to build</param>\n+        /// <param name=\"result\">the result</param>\n+        /// <returns>An indicator of the kind of result</returns>\n+        private static SLD_STATUS ConvertBigIntegerToFloatingPointBits(byte[] integerValueAsBytes, uint integerBitsOfPrecision, bool hasNonzeroFractionalPart, FloatingPointType type, out ulong result)\n+        {\n+            int baseExponent = type.DenormalMantissaBits;\n+            int exponent;\n+            ulong mantissa;\n+            bool has_zero_tail = !hasNonzeroFractionalPart;\n+            int topElementIndex = ((int)integerBitsOfPrecision - 1) / 8;\n+\n+            // The high-order byte of integerValueAsBytes might not have a full eight bits.  However,  \n+            // since the data are stored in quanta of 8 bits, and we really only need around 54  \n+            // bits of mantissa for a double (and fewer for a float), we can just assemble data  \n+            // from the eight high-order bytes and we will get between 59 and 64 bits, which is more  \n+            // than enough.\n+            int bottomElementIndex = Math.Max(0, topElementIndex - (64 / 8) + 1);\n+            exponent = baseExponent + bottomElementIndex * 8;\n+            mantissa = 0;\n+            for (int i = (int)topElementIndex; i >= bottomElementIndex; i--)\n+            {\n+                mantissa <<= 8;\n+                mantissa |= integerValueAsBytes[i];\n+            }\n+            for (int i = bottomElementIndex - 1; has_zero_tail && i >= 0; i--)\n+            {\n+                if (integerValueAsBytes[i] != 0) has_zero_tail = false;\n+            }\n+\n+            return type.AssembleFloatingPointValue(mantissa, exponent, has_zero_tail, out result);\n+        }\n+\n+        /// <summary>\n+        /// Parse a sequence of digits into a BigInteger.\n+        /// </summary>\n+        /// <param name=\"data\">The DecimalFloatingPointString containing the digits in its Mantissa</param>\n+        /// <param name=\"integer_first_index\">The index of the first digit to convert</param>\n+        /// <param name=\"integer_last_index\">The index just past the last digit to convert</param>\n+        /// <returns>The BigInteger result</returns>\n+        private static BigInteger AccumulateDecimalDigitsIntoBigInteger(DecimalFloatingPointString data, uint integer_first_index, uint integer_last_index)\n+        {\n+            if (integer_first_index == integer_last_index) return BigZero;\n+            var valueString = data.Mantissa.Substring((int)integer_first_index, (int)(integer_last_index - integer_first_index));\n+            return BigInteger.Parse(valueString);\n+        }\n+\n+        /// <summary>\n+        /// Return the number of significant bits set. \n+        /// </summary>\n+        private static uint CountSignificantBits(ulong data)\n+        {\n+            uint result = 0;\n+            while (data != 0)\n+            {\n+                data >>= 1;\n+                result++;\n+            }\n+\n+            return result;\n+        }\n+\n+        /// <summary>\n+        /// Return the number of significant bits set. \n+        /// </summary>\n+        private static uint CountSignificantBits(byte data)\n+        {\n+            uint result = 0;\n+            while (data != 0)\n+            {\n+                data >>= 1;\n+                result++;\n+            }\n+\n+            return result;\n+        }\n+\n+        /// <summary>\n+        /// Return the number of significant bits set. \n+        /// </summary>\n+        private static uint CountSignificantBits(BigInteger data, out byte[] dataBytes)\n+        {\n+            if (data.IsZero)\n+            {\n+                dataBytes = new byte[1];\n+                return 0;\n+            }\n+\n+            dataBytes = data.ToByteArray(); // the bits of the BigInteger, least significant bits first\n+            for (int i = dataBytes.Length - 1; i >= 0; i--)\n+            {\n+                var v = dataBytes[i];\n+                if (v != 0) return 8 * (uint)i + CountSignificantBits(v);\n+            }\n+\n+            return 0;\n+        }\n+\n+        /// <summary>\n+        /// Return the number of significant bits set. \n+        /// </summary>\n+        private static uint CountSignificantBits(BigInteger data)\n+        {\n+            byte[] dataBytes;\n+            return CountSignificantBits(data, out dataBytes);\n+        }\n+\n+        /// <summary>\n+        /// Computes value / 2^shift, then rounds the result according to the current  \n+        /// rounding mode.  By the time we call this function, we will already have  \n+        /// discarded most digits.  The caller must pass true for has_zero_tail if  \n+        /// all discarded bits were zeroes.  \n+        /// </summary>\n+        /// <param name=\"value\">The value to shift</param>\n+        /// <param name=\"shift\">The amount of shift</param>\n+        /// <param name=\"hasZeroTail\">Whether there are any less significant nonzero bits in the value</param>\n+        /// <returns></returns>\n+        private static ulong RightShiftWithRounding(ulong value, int shift, bool hasZeroTail)\n+        {\n+            // If we'd need to shift further than it is possible to shift, the answer  \n+            // is always zero:  \n+            if (shift >= 64) return 0;\n+\n+            ulong extraBitsMask = (1UL << (shift - 1)) - 1;\n+            ulong roundBitMask = (1UL << (shift - 1));\n+            ulong lsbBitMask = 1UL << shift;\n+\n+            bool lsbBit = (value & lsbBitMask) != 0;\n+            bool roundBit = (value & roundBitMask) != 0;\n+            bool hasTailBits = !hasZeroTail || (value & extraBitsMask) != 0;\n+\n+            return (value >> shift) + (ShouldRoundUp(lsbBit: lsbBit, roundBit: roundBit, hasTailBits: hasTailBits) ? 1UL : 0);\n+        }\n+\n+        /// <summary>\n+        /// Determines whether a mantissa should be rounded up in the  \n+        /// round-to-nearest-ties-to-even mode given [1] the value of the least  \n+        /// significant bit of the mantissa, [2] the value of the next bit after  \n+        /// the least significant bit (the \"round\" bit) and [3] whether any  \n+        /// trailing bits after the round bit are set.  \n+        ///  \n+        /// The mantissa is treated as an unsigned integer magnitude.  \n+        ///  \n+        /// For this function, \"round up\" is defined as \"increase the magnitude\" of the  \n+        /// mantissa.\n+        /// </summary>\n+        /// <param name=\"lsbBit\">the least-significant bit of the representable value</param>\n+        /// <param name=\"roundBit\">the bit following the least-significant bit</param>\n+        /// <param name=\"hasTailBits\">true if there are any (less significant) bits set following roundBit</param>\n+        /// <returns></returns>\n+        private static bool ShouldRoundUp(\n+            bool lsbBit,\n+            bool roundBit,\n+            bool hasTailBits)\n+        {\n+            // If there are insignificant set bits, we need to round to the  \n+            // nearest; there are two cases:  \n+            // we round up if either [1] the value is slightly greater than the midpoint  \n+            // between two exactly representable values or [2] the value is exactly the  \n+            // midpoint between two exactly representable values and the greater of the  \n+            // two is even (this is \"round-to-even\").  \n+            return roundBit && (hasTailBits || lsbBit);\n+        }\n+\n+        /// <summary>\n+        /// Multiply a BigInteger by the given power of two.\n+        /// </summary>\n+        /// <param name=\"number\">The BigInteger to multiply by a power of two and replace with the product</param>\n+        /// <param name=\"shift\">The power of two to multiply it by</param>\n+        private static void ShiftLeft(ref BigInteger number, uint shift)\n+        {\n+            var powerOfTwo = BigInteger.Pow(BigTwo, (int)shift);\n+            number = number * powerOfTwo;\n+        }\n+\n+        /// <summary>\n+        /// Multiply a BigInteger by the given power of ten.\n+        /// </summary>\n+        /// <param name=\"number\">The BigInteger to multiply by a power of ten and replace with the product</param>\n+        /// <param name=\"power\">The power of ten to multiply it by</param>\n+        private static void MultiplyByPowerOfTen(ref BigInteger number, uint power)","path":"src/Compilers/Core/Portable/RealParser.cs","position":745,"original_position":745,"commit_id":"3a2d4e281f60afd8770ceabc5c32b3ed419becbf","original_commit_id":"3a2d4e281f60afd8770ceabc5c32b3ed419becbf","user":{"login":"leppie","id":127666,"avatar_url":"https://avatars.githubusercontent.com/u/127666?v=3","gravatar_id":"","url":"https://api.github.com/users/leppie","html_url":"https://github.com/leppie","followers_url":"https://api.github.com/users/leppie/followers","following_url":"https://api.github.com/users/leppie/following{/other_user}","gists_url":"https://api.github.com/users/leppie/gists{/gist_id}","starred_url":"https://api.github.com/users/leppie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leppie/subscriptions","organizations_url":"https://api.github.com/users/leppie/orgs","repos_url":"https://api.github.com/users/leppie/repos","events_url":"https://api.github.com/users/leppie/events{/privacy}","received_events_url":"https://api.github.com/users/leppie/received_events","type":"User","site_admin":false},"body":"Not sure if performance is an issue here for large exponents, but can be made faster with a lookup table, but would probably be too much overhead for just a compiler.","created_at":"2015-09-30T08:43:30Z","updated_at":"2015-09-30T08:43:30Z","html_url":"https://github.com/dotnet/roslyn/pull/5379#discussion_r40770554","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5379","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/40770554"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5379#discussion_r40770554"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5379"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/5379","id":45610694,"html_url":"https://github.com/dotnet/roslyn/pull/5379","diff_url":"https://github.com/dotnet/roslyn/pull/5379.diff","patch_url":"https://github.com/dotnet/roslyn/pull/5379.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/5379","number":5379,"state":"open","locked":false,"title":"Correct conversion of float and double literals","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"body":"Fixes #4221 \r\n\r\nThis is a port of real conversion routines used in the C++ front end written by @JamesMcNellis. There is a new separate Windows-specific solution for running a large number of random tests compared against the C standard library, which is based on David Gay's code (the \"gold standard\").\r\n\r\n@agocke @AlekseyTs @jaredpar @TyOverby @VSadov Please review\r\n/cc @MattGertz @JamesMcNellis\r\n","created_at":"2015-09-21T22:56:35Z","updated_at":"2015-09-30T08:43:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e09b72dd432441050dfe9e9c7c8408ebcbc33289","assignee":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/3","html_url":"https://github.com/dotnet/roslyn/milestones/1.1","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/3/labels","id":937401,"number":3,"title":"1.1","description":"This is our 1.1 Milestone.\r\n\r\n<!---\r\n@huboard:{\"order\":1.5}\r\n-->\r\n","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":297,"closed_issues":444,"state":"open","created_at":"2015-01-15T20:48:41Z","updated_at":"2015-09-30T04:36:27Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5379/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5379/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/5379/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/3a2d4e281f60afd8770ceabc5c32b3ed419becbf","head":{"label":"gafter:RealParser","ref":"RealParser","sha":"3a2d4e281f60afd8770ceabc5c32b3ed419becbf","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"repo":{"id":30125216,"name":"roslyn","full_name":"gafter/roslyn","owner":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gafter/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/gafter/roslyn","forks_url":"https://api.github.com/repos/gafter/roslyn/forks","keys_url":"https://api.github.com/repos/gafter/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gafter/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gafter/roslyn/teams","hooks_url":"https://api.github.com/repos/gafter/roslyn/hooks","issue_events_url":"https://api.github.com/repos/gafter/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/gafter/roslyn/events","assignees_url":"https://api.github.com/repos/gafter/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/gafter/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/gafter/roslyn/tags","blobs_url":"https://api.github.com/repos/gafter/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gafter/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gafter/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/gafter/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gafter/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/gafter/roslyn/languages","stargazers_url":"https://api.github.com/repos/gafter/roslyn/stargazers","contributors_url":"https://api.github.com/repos/gafter/roslyn/contributors","subscribers_url":"https://api.github.com/repos/gafter/roslyn/subscribers","subscription_url":"https://api.github.com/repos/gafter/roslyn/subscription","commits_url":"https://api.github.com/repos/gafter/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/gafter/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/gafter/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/gafter/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/gafter/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/gafter/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gafter/roslyn/merges","archive_url":"https://api.github.com/repos/gafter/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gafter/roslyn/downloads","issues_url":"https://api.github.com/repos/gafter/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/gafter/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/gafter/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/gafter/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gafter/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/gafter/roslyn/releases{/id}","created_at":"2015-01-31T20:26:12Z","updated_at":"2015-08-20T15:00:44Z","pushed_at":"2015-09-21T22:49:23Z","git_url":"git://github.com/gafter/roslyn.git","ssh_url":"git@github.com:gafter/roslyn.git","clone_url":"https://github.com/gafter/roslyn.git","svn_url":"https://github.com/gafter/roslyn","homepage":"","size":98806,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"950f43b4f2fb10ff0965d01868fe6155cec1ccf3","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-09-30T05:38:53Z","pushed_at":"2015-09-30T08:04:09Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":201787,"stargazers_count":3383,"watchers_count":3383,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":792,"mirror_url":null,"open_issues_count":1512,"forks":792,"open_issues":1512,"watchers":3383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5379"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5379"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5379"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5379/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5379/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5379/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/3a2d4e281f60afd8770ceabc5c32b3ed419becbf"}}}}