1697 {
1698 if (!
double.IsFinite(
value))
1699 {
1700 if (
double.IsNaN(
value))
1701 {
1702 return info.NaNSymbol;
1703 }
1704 if (!
double.IsNegative(
value))
1705 {
1706 return info.PositiveInfinitySymbol;
1707 }
1708 return info.NegativeInfinitySymbol;
1709 }
1710 int digits;
1712 byte* digits2 = stackalloc byte[769];
1713 if (c == '\0')
1714 {
1715 digits = 15;
1716 }
1717 NumberBuffer number = new NumberBuffer(NumberBufferKind.FloatingPoint, digits2, 769);
1718 number.IsNegative =
double.IsNegative(
value);
1719 bool isSignificantDigits;
1721 if (
value != 0.0 && (!isSignificantDigits || !Grisu3.TryRunDouble(
value, digits, ref number)))
1722 {
1724 }
1725 if (c != 0)
1726 {
1727 if (digits == -1)
1728 {
1729 nMaxDigits = Math.Max(number.DigitsCount, 17);
1730 }
1732 }
1733 else
1734 {
1736 }
1737 return null;
1738 }
static char ParseFormatSpecifier(ReadOnlySpan< char > format, out int digits)
static unsafe void NumberToStringFormat(ref ValueStringBuilder sb, ref NumberBuffer number, ReadOnlySpan< char > format, NumberFormatInfo info)
static void NumberToString(ref ValueStringBuilder sb, ref NumberBuffer number, char format, int nMaxDigits, NumberFormatInfo info)
static void Dragon4Double(double value, int cutoffNumber, bool isSignificantDigits, ref NumberBuffer number)
static int GetFloatingPointMaxDigitsAndPrecision(char fmt, ref int precision, NumberFormatInfo info, out bool isSignificantDigits)