1811 {
1812 if (!Half.IsFinite(
value))
1813 {
1814 if (Half.IsNaN(
value))
1815 {
1816 return info.NaNSymbol;
1817 }
1818 if (!Half.IsNegative(
value))
1819 {
1820 return info.PositiveInfinitySymbol;
1821 }
1822 return info.NegativeInfinitySymbol;
1823 }
1824 int digits;
1826 byte* digits2 = stackalloc byte[21];
1827 if (c == '\0')
1828 {
1829 digits = 5;
1830 }
1831 NumberBuffer number = new NumberBuffer(NumberBufferKind.FloatingPoint, digits2, 21);
1832 number.IsNegative = Half.IsNegative(
value);
1833 bool isSignificantDigits;
1835 if (
value !=
default(Half) && (!isSignificantDigits || !Grisu3.TryRunHalf(
value, digits, ref number)))
1836 {
1838 }
1839 if (c != 0)
1840 {
1841 if (digits == -1)
1842 {
1843 nMaxDigits = Math.Max(number.DigitsCount, 5);
1844 }
1846 }
1847 else
1848 {
1850 }
1851 return null;
1852 }
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 Dragon4Half(Half value, int cutoffNumber, bool isSignificantDigits, ref NumberBuffer number)
static void NumberToString(ref ValueStringBuilder sb, ref NumberBuffer number, char format, int nMaxDigits, NumberFormatInfo info)
static int GetFloatingPointMaxDigitsAndPrecision(char fmt, ref int precision, NumberFormatInfo info, out bool isSignificantDigits)