1030 references to Number
System.Private.CoreLib (1030)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Formatter\Utf8Formatter.Integer.cs (20)
138return Number.TryUInt32ToDecStr(value, destination, out bytesWritten); 144return Number.TryUInt32ToDecStr(value, format.PrecisionOrZero, destination, out bytesWritten); 147return Number.TryInt32ToHexStr((int)value, Number.GetHexBase(format.Symbol), format.PrecisionOrZero, destination, out bytesWritten); 195Number.TryUInt32ToDecStr((uint)value, destination, out bytesWritten) : 196Number.TryNegativeInt32ToDecStr(value, format.PrecisionOrZero, "-"u8, destination, out bytesWritten); 203Number.TryUInt32ToDecStr((uint)value, format.PrecisionOrZero, destination, out bytesWritten) : 204Number.TryNegativeInt32ToDecStr(value, format.PrecisionOrZero, "-"u8, destination, out bytesWritten); 207return Number.TryInt32ToHexStr(value & hexMask, Number.GetHexBase(format.Symbol), format.PrecisionOrZero, destination, out bytesWritten); 252return Number.TryUInt64ToDecStr(value, destination, out bytesWritten); 258return Number.TryUInt64ToDecStr(value, format.PrecisionOrZero, destination, out bytesWritten); 261return Number.TryInt64ToHexStr((long)value, Number.GetHexBase(format.Symbol), format.PrecisionOrZero, destination, out bytesWritten); 306Number.TryUInt64ToDecStr((ulong)value, destination, out bytesWritten) : 307Number.TryNegativeInt64ToDecStr(value, format.PrecisionOrZero, "-"u8, destination, out bytesWritten); 314Number.TryUInt64ToDecStr((ulong)value, format.PrecisionOrZero, destination, out bytesWritten) : 315Number.TryNegativeInt64ToDecStr(value, format.PrecisionOrZero, "-"u8, destination, out bytesWritten); 318return Number.TryInt64ToHexStr(value, Number.GetHexBase(format.Symbol), format.PrecisionOrZero, destination, out bytesWritten);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Decimal.cs (5)
50Number.NumberBuffer number = new Number.NumberBuffer(Number.NumberBufferKind.Decimal, stackalloc byte[Number.DecimalNumberBufferLength]); 67if (!Number.TryNumberToDecimal(ref number, ref value))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Float.cs (11)
32Number.NumberBuffer number = new Number.NumberBuffer(Number.NumberBufferKind.FloatingPoint, stackalloc byte[Number.SingleNumberBufferLength]); 36value = Number.NumberToFloat<float>(ref number); 65Number.NumberBuffer number = new Number.NumberBuffer(Number.NumberBufferKind.FloatingPoint, stackalloc byte[Number.DoubleNumberBufferLength]); 69value = Number.NumberToFloat<double>(ref number); 79private static bool TryParseNormalAsFloatingPoint(ReadOnlySpan<byte> source, ref Number.NumberBuffer number, out int bytesConsumed, char standardFormat)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Number.cs (1)
16private static bool TryParseNumber(ReadOnlySpan<byte> source, ref Number.NumberBuffer number, out int bytesConsumed, ParseNumberOptions options, out bool textUsedExponentNotation)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (23)
111return Number.ParseBinaryInteger<char, byte>(s, style, NumberFormatInfo.GetInstance(provider)); 127return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 133return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 138return Number.UInt32ToDecStr(m_value); 143return Number.FormatUInt32(m_value, format, null); 148return Number.UInt32ToDecStr(m_value); 153return Number.FormatUInt32(m_value, format, provider); 158return Number.TryFormatUInt32(m_value, format, provider, destination, out charsWritten); 164return Number.TryFormatUInt32(m_value, format, provider, utf8Destination, out bytesWritten); 1105return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1112return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1119return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1187return Number.ParseBinaryInteger<byte, byte>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1194return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
264Number.ThrowOverflowException<char>();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (31)
484return Number.FormatDecimal(this, null, NumberFormatInfo.CurrentInfo); 489return Number.FormatDecimal(this, format, NumberFormatInfo.CurrentInfo); 494return Number.FormatDecimal(this, null, NumberFormatInfo.GetInstance(provider)); 499return Number.FormatDecimal(this, format, NumberFormatInfo.GetInstance(provider)); 504return Number.TryFormatDecimal(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 510return Number.TryFormatDecimal(this, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 538return Number.ParseDecimal(s, style, NumberFormatInfo.GetInstance(provider)); 554return Number.TryParseDecimal(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 560return Number.TryParseDecimal(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 712Number.ThrowOverflowException<byte>(); 715if (temp != (byte)temp) Number.ThrowOverflowException<byte>(); 733Number.ThrowOverflowException<sbyte>(); 736if (temp != (sbyte)temp) Number.ThrowOverflowException<sbyte>(); 753Number.ThrowOverflowException<short>(); 756if (temp != (short)temp) Number.ThrowOverflowException<short>(); 828Number.ThrowOverflowException<ushort>(); 831if (temp != (ushort)temp) Number.ThrowOverflowException<ushort>(); 1780return Number.TryParseDecimal(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1787return Number.TryParseDecimal(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1794return Number.TryParseDecimal(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1829return Number.ParseDecimal(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1836return Number.TryParseDecimal(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (15)
163Number.ThrowDecimalOverflowException(); 619Number.ThrowDecimalOverflowException(); 699Number.ThrowDecimalOverflowException(); 724Number.ThrowDecimalOverflowException(); 779Number.ThrowDecimalOverflowException(); 905Number.ThrowDecimalOverflowException(); 1169Number.ThrowDecimalOverflowException(); 1585Number.ThrowDecimalOverflowException(); 1625Number.ThrowDecimalOverflowException(); 1694/// <see cref="Number.ComputeFloat{TFloat}(long, ulong)"/>), which avoid the integer division that 1713return TFloat.CreateSaturating((double)low64 / Number.Pow10DoubleTable[scale]); 1719(int Exponent, ulong Mantissa) am = Number.ComputeFloat<TFloat>(-scale, low64); 1948Number.ThrowDecimalOverflowException(); 2026Number.ThrowDecimalOverflowException(); 2097Number.ThrowDecimalOverflowException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (18)
359return Number.FormatFloat(m_value, null, NumberFormatInfo.CurrentInfo); 364return Number.FormatFloat(m_value, format, NumberFormatInfo.CurrentInfo); 369return Number.FormatFloat(m_value, null, NumberFormatInfo.GetInstance(provider)); 374return Number.FormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider)); 379return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 385return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 414return Number.ParseFloat<char, double>(s, style, NumberFormatInfo.GetInstance(provider)); 430return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _); 436return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result, out _); 1500return Number.TryParseFloat(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 1507return Number.TryParseFloat(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 1514return Number.TryParseFloat(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed); 2315return Number.ParseFloat<byte, double>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 2322return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _); 2335static int IBinaryFloatParseAndFormatInfo<double>.NumberBufferLength => Number.DoubleNumberBufferLength;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (5)
944Number.ParsingStatus status = Number.TryParseBinaryIntegerStyle(value, NumberStyle, numberFormat, out result, out _); 945if (status == Number.ParsingStatus.OK) 950if (status != Number.ParsingStatus.Overflow) 958Number.ThrowOverflowException<TUnderlying>();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (54)
178Number.WriteTwoDigits((uint)value, ptr); 185Number.WriteFourDigits((uint)value, ptr); 191TChar* p = Number.UInt32ToDecChars(buffer + 16, (uint)value, minimumLength); 836Number.WriteTwoDigits((uint)offset.Hours, p); 844Number.WriteTwoDigits((uint)offset.Hours, p); 846Number.WriteTwoDigits((uint)offset.Minutes, p + 3); 890Number.WriteTwoDigits((uint)offset.Hours, hoursMinutes); 892Number.WriteTwoDigits((uint)offset.Minutes, hoursMinutes + 3); 1358Number.WriteTwoDigits((uint)hour, dest); 1360Number.WriteTwoDigits((uint)minute, dest + 3); 1362Number.WriteTwoDigits((uint)second, dest + 6); 1364Number.WriteDigits((uint)fraction, dest + 9, 7); 1386Number.WriteTwoDigits((uint)hour, dest); 1388Number.WriteTwoDigits((uint)minute, dest + 3); 1390Number.WriteTwoDigits((uint)second, dest + 6); 1413Number.WriteFourDigits((uint)year, dest); 1415Number.WriteTwoDigits((uint)month, dest + 5); 1417Number.WriteTwoDigits((uint)day, dest + 8); 1452Number.WriteTwoDigits((uint)day, dest + 5); 1459Number.WriteFourDigits((uint)year, dest + 12); 1505Number.WriteFourDigits((uint)year, dest); 1507Number.WriteTwoDigits((uint)month, dest + 5); 1509Number.WriteTwoDigits((uint)day, dest + 8); 1512Number.WriteTwoDigits((uint)hour, dest + 11); 1514Number.WriteTwoDigits((uint)minute, dest + 14); 1516Number.WriteTwoDigits((uint)second, dest + 17); 1518Number.WriteDigits((uint)tick, dest + 20, 7); 1534Number.WriteTwoDigits((uint)offsetHours, dest + 28); 1536Number.WriteTwoDigits((uint)offsetMinutes, dest + 31); 1565Number.WriteFourDigits((uint)year, dest); 1567Number.WriteTwoDigits((uint)month, dest + 5); 1569Number.WriteTwoDigits((uint)day, dest + 8); 1572Number.WriteTwoDigits((uint)hour, dest + 11); 1574Number.WriteTwoDigits((uint)minute, dest + 14); 1576Number.WriteTwoDigits((uint)second, dest + 17); 1605Number.WriteFourDigits((uint)year, dest); 1607Number.WriteTwoDigits((uint)month, dest + 5); 1609Number.WriteTwoDigits((uint)day, dest + 8); 1612Number.WriteTwoDigits((uint)hour, dest + 11); 1614Number.WriteTwoDigits((uint)minute, dest + 14); 1616Number.WriteTwoDigits((uint)second, dest + 17); 1659Number.WriteTwoDigits((uint)day, dest + 5); 1666Number.WriteFourDigits((uint)year, dest + 12); 1669Number.WriteTwoDigits((uint)hour, dest + 17); 1671Number.WriteTwoDigits((uint)minute, dest + 20); 1673Number.WriteTwoDigits((uint)second, dest + 23); 1712Number.WriteTwoDigits((uint)month, dest); 1714Number.WriteTwoDigits((uint)day, dest + 3); 1716Number.WriteFourDigits((uint)year, dest + 6); 1720Number.WriteTwoDigits((uint)hour, dest + 11); 1722Number.WriteTwoDigits((uint)minute, dest + 14); 1724Number.WriteTwoDigits((uint)second, dest + 17); 1739Number.WriteTwoDigits((uint)offsetHours, dest + 21); 1741Number.WriteTwoDigits((uint)offsetMinutes, dest + 24);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (5)
245Number.WriteDigits(days, p, dayDigits); 254Number.WriteTwoDigits(hours, p); 262Number.WriteTwoDigits((uint)minutes, p); 265Number.WriteTwoDigits((uint)seconds, p); 285Number.WriteDigits(fraction, p, fractionDigits);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (4)
487guidString = Number.SpanTrim(guidString); // Remove whitespace from beginning and end 594if (Number.TryParseBinaryIntegerHexOrBinaryNumberStyle<TChar, uint, Number.HexParser<uint>>(guidString.Slice(28, 8), NumberStyles.AllowHexSpecifier, out uintTmp, out _) == Number.ParsingStatus.OK) // _h, _i, _j, _k
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (18)
359return Number.ParseFloat<char, Half>(s, style, NumberFormatInfo.GetInstance(provider)); 395return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _); 409return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result, out _); 503return Number.FormatFloat(this, null, NumberFormatInfo.CurrentInfo); 511return Number.FormatFloat(this, format, NumberFormatInfo.CurrentInfo); 519return Number.FormatFloat(this, null, NumberFormatInfo.GetInstance(provider)); 527return Number.FormatFloat(this, format, NumberFormatInfo.GetInstance(provider)); 540return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 546return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 2171return Number.TryParseFloat(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 2178return Number.TryParseFloat(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 2185return Number.TryParseFloat(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed); 2336return Number.ParseFloat<byte, Half>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 2343return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _); 2356static int IBinaryFloatParseAndFormatInfo<Half>.NumberBufferLength => Number.HalfNumberBufferLength;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int128.cs (23)
100return Number.Int128ToDecStr(this); 105return Number.FormatInt128(this, null, provider); 110return Number.FormatInt128(this, format, null); 115return Number.FormatInt128(this, format, provider); 120return Number.TryFormatInt128(this, format, provider, destination, out charsWritten); 126return Number.TryFormatInt128(this, format, provider, utf8Destination, out bytesWritten); 144return Number.ParseBinaryInteger<char, Int128>(s, style, NumberFormatInfo.GetInstance(provider)); 160return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 166return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1913return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1920return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1927return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 2118return Number.ParseBinaryInteger<byte, Int128>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 2125return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (22)
100return Number.Int32ToDecStr(m_value); 105return Number.FormatInt32(m_value, 0, null, provider); 115return Number.FormatInt32(m_value, 0x0000FFFF, format, provider); 120return Number.TryFormatInt32(m_value, 0x0000FFFF, format, provider, destination, out charsWritten); 126return Number.TryFormatInt32(m_value, 0x0000FFFF, format, provider, utf8Destination, out bytesWritten); 144return Number.ParseBinaryInteger<char, short>(s, style, NumberFormatInfo.GetInstance(provider)); 160return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 166return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1304return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1311return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1318return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1393return Number.ParseBinaryInteger<byte, short>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1400return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (22)
116return Number.Int32ToDecStr(m_value); 126return Number.FormatInt32(m_value, 0, null, provider); 131return Number.FormatInt32(m_value, ~0, format, provider); 136return Number.TryFormatInt32(m_value, ~0, format, provider, destination, out charsWritten); 142return Number.TryFormatInt32(m_value, ~0, format, provider, utf8Destination, out bytesWritten); 160return Number.ParseBinaryInteger<char, int>(s, style, NumberFormatInfo.GetInstance(provider)); 176return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 182return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1355return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1362return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1369return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1444return Number.ParseBinaryInteger<byte, int>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1451return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (23)
113return Number.Int64ToDecStr(m_value); 118return Number.FormatInt64(m_value, null, provider); 123return Number.FormatInt64(m_value, format, null); 128return Number.FormatInt64(m_value, format, provider); 133return Number.TryFormatInt64(m_value, format, provider, destination, out charsWritten); 139return Number.TryFormatInt64(m_value, format, provider, utf8Destination, out bytesWritten); 157return Number.ParseBinaryInteger<char, long>(s, style, NumberFormatInfo.GetInstance(provider)); 173return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 179return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1358return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1365return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1372return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1447return Number.ParseBinaryInteger<byte, long>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1454return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (9)
1372return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<nint, nint_t>(ref result), out charsConsumed) == Number.ParsingStatus.OK; 1380return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<nint, nint_t>(ref result), out charsConsumed) == Number.ParsingStatus.OK; 1388return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<nint, nint_t>(ref result), out bytesConsumed) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
1430if ((digits > maxFastRoundingDigits) || !Number.TryRoundToDecimalDigitsFast(value, digits, mode, out double rounded)) 1432rounded = Number.RoundToDecimalDigits<double>(value, digits, mode);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (2)
454if ((digits > maxFastRoundingDigits) || !Number.TryRoundToDecimalDigitsFast(x, digits, mode, out float rounded)) 456rounded = Number.RoundToDecimalDigits<float>(x, digits, mode);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (1)
489DecodedDecimalIeee754<TValue> unpackDecimal = Number.UnpackDecimalIeee754<TDecimal, TValue>(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
151static abstract TValue NumberToSignificand(ref Number.NumberBuffer number, int digits);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (17)
275return Number.ParseFloat<char, BFloat16>(s, style, NumberFormatInfo.GetInstance(provider)); 311return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _); 325return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result, out _); 388public override string ToString() => Number.FormatFloat(this, null, NumberFormatInfo.CurrentInfo); 395return Number.FormatFloat(this, format, NumberFormatInfo.CurrentInfo); 403return Number.FormatFloat(this, null, NumberFormatInfo.GetInstance(provider)); 411return Number.FormatFloat(this, format, NumberFormatInfo.GetInstance(provider)); 424return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 430return Number.TryFormatFloat(this, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 1948return Number.TryParseFloat(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 1955return Number.TryParseFloat(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 1962return Number.TryParseFloat(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed); 2113return Number.ParseFloat<byte, BFloat16>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 2120return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (174)
133return Number.ParseDecimalIeee754<char, Decimal128, UInt128>(s, style, NumberFormatInfo.GetInstance(provider)); 191return Number.TryParseDecimalIeee754<char, Decimal128, UInt128>(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 205return Number.TryParseDecimalIeee754<char, Decimal128, UInt128>(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 223return Number.CompareDecimalIeee754<Decimal128, UInt128>(current, another); 231return Number.CompareDecimalIeee754<Decimal128, UInt128>(current, another) == 0; 247return Number.GetDecimalIeee754HashCode<Decimal128, UInt128>(new UInt128(_upper, _lower)); 266public static UInt128 EncodeDecimal(Decimal128 x) => Number.EncodeDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower)); 272public static Decimal128 DecodeDecimal(UInt128 x) => new Decimal128(Number.DecodeDecimalIeee754<Decimal128, UInt128>(x)); 279return Number.FormatDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower), null, NumberFormatInfo.CurrentInfo); 287return Number.FormatDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower), format, NumberFormatInfo.CurrentInfo); 295return Number.FormatDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower), null, NumberFormatInfo.GetInstance(provider)); 303return Number.FormatDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower), format, NumberFormatInfo.GetInstance(provider)); 309return Number.TryFormatDecimalIeee754<Decimal128, UInt128, char>(new UInt128(_upper, _lower), format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 315return Number.TryFormatDecimalIeee754<Decimal128, UInt128, byte>(new UInt128(_upper, _lower), format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 333UInt128 result = Number.AddDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower), OneValue); 342UInt128 result = Number.SubtractDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower), OneValue); 352UInt128 result = Number.AddDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 362UInt128 result = Number.SubtractDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 372UInt128 result = Number.MultiplyDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 382UInt128 result = Number.DivideDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 392UInt128 result = Number.RemainderDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 403public static explicit operator Decimal128(Int128 value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, Int128>(value)); 409public static explicit operator Decimal128(UInt128 value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, UInt128>(value)); 414public static explicit operator Decimal128(Half value) => new Decimal128(Number.ConvertFloatToDecimalIeee754<Half, Decimal128, UInt128>(value)); 419public static explicit operator Decimal128(float value) => new Decimal128(Number.ConvertFloatToDecimalIeee754<float, Decimal128, UInt128>(value)); 424public static explicit operator Decimal128(double value) => new Decimal128(Number.ConvertFloatToDecimalIeee754<double, Decimal128, UInt128>(value)); 433public static explicit operator byte(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, byte>(new UInt128(value._upper, value._lower), isChecked: false); 439public static explicit operator checked byte(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, byte>(new UInt128(value._upper, value._lower), isChecked: true); 445public static explicit operator sbyte(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, sbyte>(new UInt128(value._upper, value._lower), isChecked: false); 452public static explicit operator checked sbyte(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, sbyte>(new UInt128(value._upper, value._lower), isChecked: true); 457public static explicit operator char(Decimal128 value) => (char)Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, ushort>(new UInt128(value._upper, value._lower), isChecked: false); 463public static explicit operator checked char(Decimal128 value) => (char)Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, ushort>(new UInt128(value._upper, value._lower), isChecked: true); 468public static explicit operator short(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, short>(new UInt128(value._upper, value._lower), isChecked: false); 474public static explicit operator checked short(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, short>(new UInt128(value._upper, value._lower), isChecked: true); 480public static explicit operator ushort(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, ushort>(new UInt128(value._upper, value._lower), isChecked: false); 487public static explicit operator checked ushort(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, ushort>(new UInt128(value._upper, value._lower), isChecked: true); 492public static explicit operator int(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, int>(new UInt128(value._upper, value._lower), isChecked: false); 498public static explicit operator checked int(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, int>(new UInt128(value._upper, value._lower), isChecked: true); 504public static explicit operator uint(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, uint>(new UInt128(value._upper, value._lower), isChecked: false); 511public static explicit operator checked uint(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, uint>(new UInt128(value._upper, value._lower), isChecked: true); 516public static explicit operator nint(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, nint>(new UInt128(value._upper, value._lower), isChecked: false); 522public static explicit operator checked nint(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, nint>(new UInt128(value._upper, value._lower), isChecked: true); 528public static explicit operator nuint(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, nuint>(new UInt128(value._upper, value._lower), isChecked: false); 535public static explicit operator checked nuint(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, nuint>(new UInt128(value._upper, value._lower), isChecked: true); 540public static explicit operator long(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, long>(new UInt128(value._upper, value._lower), isChecked: false); 546public static explicit operator checked long(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, long>(new UInt128(value._upper, value._lower), isChecked: true); 552public static explicit operator ulong(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, ulong>(new UInt128(value._upper, value._lower), isChecked: false); 559public static explicit operator checked ulong(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, ulong>(new UInt128(value._upper, value._lower), isChecked: true); 564public static explicit operator Int128(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, Int128>(new UInt128(value._upper, value._lower), isChecked: false); 570public static explicit operator checked Int128(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, Int128>(new UInt128(value._upper, value._lower), isChecked: true); 576public static explicit operator UInt128(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, UInt128>(new UInt128(value._upper, value._lower), isChecked: false); 583public static explicit operator checked UInt128(Decimal128 value) => Number.ConvertDecimalIeee754ToInteger<Decimal128, UInt128, UInt128>(new UInt128(value._upper, value._lower), isChecked: true); 588public static explicit operator Half(Decimal128 value) => Number.ConvertDecimalIeee754ToFloat<Decimal128, UInt128, Half>(new UInt128(value._upper, value._lower)); 593public static explicit operator float(Decimal128 value) => Number.ConvertDecimalIeee754ToFloat<Decimal128, UInt128, float>(new UInt128(value._upper, value._lower)); 598public static explicit operator double(Decimal128 value) => Number.ConvertDecimalIeee754ToFloat<Decimal128, UInt128, double>(new UInt128(value._upper, value._lower)); 604public static explicit operator decimal(Decimal128 value) => Number.ConvertDecimalIeee754ToDecimal<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 613public static implicit operator Decimal128(byte value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, byte>(value)); 619public static implicit operator Decimal128(sbyte value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, sbyte>(value)); 624public static implicit operator Decimal128(char value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, ushort>(value)); 629public static implicit operator Decimal128(short value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, short>(value)); 635public static implicit operator Decimal128(ushort value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, ushort>(value)); 640public static implicit operator Decimal128(int value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, int>(value)); 646public static implicit operator Decimal128(uint value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, uint>(value)); 651public static implicit operator Decimal128(nint value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, nint>(value)); 657public static implicit operator Decimal128(nuint value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, nuint>(value)); 662public static implicit operator Decimal128(long value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, long>(value)); 668public static implicit operator Decimal128(ulong value) => new Decimal128(Number.ConvertIntegerToDecimalIeee754<Decimal128, UInt128, ulong>(value)); 673public static implicit operator Decimal128(decimal value) => new Decimal128(Number.ConvertDecimalToDecimalIeee754<Decimal128, UInt128>(value)); 681return Number.EqualsDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 699return Number.LessThanDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 708return Number.GreaterThanDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 717return Number.LessThanOrEqualDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 726return Number.GreaterThanOrEqualDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower)); 737return Number.TryParseDecimalIeee754<char, Decimal128, UInt128>(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 744return Number.TryParseDecimalIeee754<char, Decimal128, UInt128>(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 751return Number.TryParseDecimalIeee754<byte, Decimal128, UInt128>(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 766return Number.ParseDecimalIeee754<byte, Decimal128, UInt128>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 773public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal128 result) => Number.TryParseDecimalIeee754<byte, Decimal128, UInt128>(utf8Text, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 795public static Decimal128 Ceiling(Decimal128 x) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), 0, MidpointRounding.ToPositiveInfinity)); 806public static Decimal128 Floor(Decimal128 x) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), 0, MidpointRounding.ToNegativeInfinity)); 809public static Decimal128 Round(Decimal128 x) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), 0, MidpointRounding.ToEven)); 812public static Decimal128 Round(Decimal128 x, int digits) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), digits, MidpointRounding.ToEven)); 815public static Decimal128 Round(Decimal128 x, MidpointRounding mode) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), 0, mode)); 818public static Decimal128 Round(Decimal128 x, int digits, MidpointRounding mode) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), digits, mode)); 821public static Decimal128 Truncate(Decimal128 x) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), 0, MidpointRounding.ToZero)); 829int exponent = Number.UnpackDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower)).UnbiasedExponent; 850if (BinaryPrimitives.TryWriteInt32BigEndian(destination, Number.UnpackDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower)).UnbiasedExponent)) 863if (BinaryPrimitives.TryWriteInt32LittleEndian(destination, Number.UnpackDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower)).UnbiasedExponent)) 876if (BinaryPrimitives.TryWriteUInt128BigEndian(destination, Number.UnpackDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower)).Significand)) 889if (BinaryPrimitives.TryWriteUInt128LittleEndian(destination, Number.UnpackDecimalIeee754<Decimal128, UInt128>(new UInt128(_upper, _lower)).Significand)) 904public static Decimal128 Acos(Decimal128 x) => new Decimal128(Number.AcosDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 907public static Decimal128 AcosPi(Decimal128 x) => new Decimal128(Number.AcosPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 910public static Decimal128 Acosh(Decimal128 x) => new Decimal128(Number.AcoshDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 913public static Decimal128 Asin(Decimal128 x) => new Decimal128(Number.AsinDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 916public static Decimal128 AsinPi(Decimal128 x) => new Decimal128(Number.AsinPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 919public static Decimal128 Asinh(Decimal128 x) => new Decimal128(Number.AsinhDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 922public static Decimal128 Atan(Decimal128 x) => new Decimal128(Number.AtanDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 925public static Decimal128 Atan2(Decimal128 y, Decimal128 x) => new Decimal128(Number.Atan2DecimalIeee754<Decimal128, UInt128>(new UInt128(y._upper, y._lower), new UInt128(x._upper, x._lower))); 928public static Decimal128 Atan2Pi(Decimal128 y, Decimal128 x) => new Decimal128(Number.Atan2PiDecimalIeee754<Decimal128, UInt128>(new UInt128(y._upper, y._lower), new UInt128(x._upper, x._lower))); 931public static Decimal128 AtanPi(Decimal128 x) => new Decimal128(Number.AtanPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 934public static Decimal128 Atanh(Decimal128 x) => new Decimal128(Number.AtanhDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 937public static Decimal128 BitDecrement(Decimal128 x) => new Decimal128(Number.BitDecrementDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 940public static Decimal128 BitIncrement(Decimal128 x) => new Decimal128(Number.BitIncrementDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 943public static Decimal128 Cbrt(Decimal128 x) => new Decimal128(Number.CbrtDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 946public static Decimal128 Cos(Decimal128 x) => new Decimal128(Number.CosDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 949public static Decimal128 CosPi(Decimal128 x) => new Decimal128(Number.CosPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 952public static Decimal128 Cosh(Decimal128 x) => new Decimal128(Number.CoshDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 955public static Decimal128 Exp(Decimal128 x) => new Decimal128(Number.ExpDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 958public static Decimal128 Exp10(Decimal128 x) => new Decimal128(Number.Exp10DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 961public static Decimal128 Exp10M1(Decimal128 x) => new Decimal128(Number.Exp10M1DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 964public static Decimal128 Exp2(Decimal128 x) => new Decimal128(Number.Exp2DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 967public static Decimal128 Exp2M1(Decimal128 x) => new Decimal128(Number.Exp2M1DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 970public static Decimal128 ExpM1(Decimal128 x) => new Decimal128(Number.ExpM1DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 973public static Decimal128 FusedMultiplyAdd(Decimal128 left, Decimal128 right, Decimal128 addend) => new Decimal128(Number.FusedMultiplyAddDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower), new UInt128(addend._upper, addend._lower))); 976public static Decimal128 Hypot(Decimal128 x, Decimal128 y) => new Decimal128(Number.HypotDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 979public static Decimal128 Ieee754Remainder(Decimal128 left, Decimal128 right) => new Decimal128(Number.Ieee754RemainderDecimalIeee754<Decimal128, UInt128>(new UInt128(left._upper, left._lower), new UInt128(right._upper, right._lower))); 982public static int ILogB(Decimal128 x) => Number.ILogBDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower)); 988public static Decimal128 Log(Decimal128 x) => new Decimal128(Number.LogDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 991public static Decimal128 Log(Decimal128 x, Decimal128 newBase) => new Decimal128(Number.LogDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(newBase._upper, newBase._lower))); 994public static Decimal128 Log10(Decimal128 x) => new Decimal128(Number.Log10DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 997public static Decimal128 Log10P1(Decimal128 x) => new Decimal128(Number.Log10P1DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1000public static Decimal128 Log2(Decimal128 x) => new Decimal128(Number.Log2DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1003public static Decimal128 Log2P1(Decimal128 x) => new Decimal128(Number.Log2P1DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1006public static Decimal128 LogP1(Decimal128 x) => new Decimal128(Number.LogP1DecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1009public static Decimal128 Pow(Decimal128 x, Decimal128 y) => new Decimal128(Number.PowDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1018public static Decimal128 RootN(Decimal128 x, int n) => new Decimal128(Number.RootNDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), n)); 1021public static Decimal128 ScaleB(Decimal128 x, int n) => new Decimal128(Number.ScaleBDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), n)); 1024public static Decimal128 Sin(Decimal128 x) => new Decimal128(Number.SinDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1029(UInt128 sin, UInt128 cos) = Number.SinCosDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower)); 1036(UInt128 sin, UInt128 cos) = Number.SinCosPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower)); 1041public static Decimal128 SinPi(Decimal128 x) => new Decimal128(Number.SinPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1044public static Decimal128 Sinh(Decimal128 x) => new Decimal128(Number.SinhDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1047public static Decimal128 Sqrt(Decimal128 x) => new Decimal128(Number.SqrtDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1050public static Decimal128 Tan(Decimal128 x) => new Decimal128(Number.TanDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1053public static Decimal128 TanPi(Decimal128 x) => new Decimal128(Number.TanPiDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1056public static Decimal128 Tanh(Decimal128 x) => new Decimal128(Number.TanhDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1062public static Decimal128 Quantize(Decimal128 x, Decimal128 y) => new Decimal128(Number.QuantizeDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1067public static Decimal128 GetQuantum(Decimal128 x) => new Decimal128(Number.QuantumDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower))); 1073public static bool HaveSameQuantum(Decimal128 x, Decimal128 y) => Number.SameQuantumDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower)); 1078public static Decimal128 Abs(Decimal128 value) => new Decimal128(Number.AbsDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower))); 1123public static bool IsInteger(Decimal128 value) => Number.IsIntegerDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1128public static bool IsEvenInteger(Decimal128 value) => Number.IsEvenIntegerDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1133public static bool IsOddInteger(Decimal128 value) => Number.IsOddIntegerDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1138public static bool IsNormal(Decimal128 value) => Number.IsNormalDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1143public static bool IsSubnormal(Decimal128 value) => Number.IsSubnormalDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1149public static Decimal128 MaxMagnitude(Decimal128 x, Decimal128 y) => new Decimal128(Number.MaxMagnitudeDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1155public static Decimal128 MaxMagnitudeNumber(Decimal128 x, Decimal128 y) => new Decimal128(Number.MaxMagnitudeNumberDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1161public static Decimal128 MinMagnitude(Decimal128 x, Decimal128 y) => new Decimal128(Number.MinMagnitudeDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1167public static Decimal128 MinMagnitudeNumber(Decimal128 x, Decimal128 y) => new Decimal128(Number.MinMagnitudeNumberDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1210public static Decimal128 CopySign(Decimal128 value, Decimal128 sign) => new Decimal128(Number.CopySignDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower), new UInt128(sign._upper, sign._lower))); 1216public static Decimal128 Max(Decimal128 x, Decimal128 y) => new Decimal128(Number.MaxDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1222public static Decimal128 MaxNative(Decimal128 x, Decimal128 y) => new Decimal128(Number.MaxNativeDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1228public static Decimal128 MaxNumber(Decimal128 x, Decimal128 y) => new Decimal128(Number.MaxNumberDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1234public static Decimal128 Min(Decimal128 x, Decimal128 y) => new Decimal128(Number.MinDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1240public static Decimal128 MinNative(Decimal128 x, Decimal128 y) => new Decimal128(Number.MinNativeDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1246public static Decimal128 MinNumber(Decimal128 x, Decimal128 y) => new Decimal128(Number.MinNumberDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), new UInt128(y._upper, y._lower))); 1252public static int Sign(Decimal128 value) => Number.SignDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1258static bool INumberBase<Decimal128>.IsCanonical(Decimal128 value) => Number.IsCanonicalDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower), nanReservedMask: new UInt128(0x01FF_C000_0000_0000, 0x0000_0000_0000_0000), nanPayloadMask: NaNPayloadMask, maxNaNPayload: new UInt128(0x0000_314D_C644_8D93, 0x38C1_5B09_FFFF_FFFF)); 1267static bool INumberBase<Decimal128>.IsZero(Decimal128 value) => Number.IsZeroDecimalIeee754<Decimal128, UInt128>(new UInt128(value._upper, value._lower)); 1741return Number.UInt128ToDecStr(significand); 1744static unsafe UInt128 IDecimalIeee754ParseAndFormatInfo<Decimal128, UInt128>.NumberToSignificand(ref Number.NumberBuffer number, int digits) 1748return Number.DigitsToUInt64(number.DigitsPtr, digits); 1752Number.AccumulateDecimalDigitsIntoBigInteger(ref number, 0, (uint)digits, out Number.BigInteger result); 1773static int IDecimalIeee754ParseAndFormatInfo<Decimal128, UInt128>.BufferLength => Number.Decimal128NumberBufferLength;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (177)
137return Number.ParseDecimalIeee754<char, Decimal32, uint>(s, style, NumberFormatInfo.GetInstance(provider)); 195return Number.TryParseDecimalIeee754<char, Decimal32, uint>(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 209return Number.TryParseDecimalIeee754<char, Decimal32, uint>(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 225return Number.CompareDecimalIeee754<Decimal32, uint>(_value, i._value); 231return Number.CompareDecimalIeee754<Decimal32, uint>(_value, other._value); 237return Number.CompareDecimalIeee754<Decimal32, uint>(_value, other._value) == 0; 253return Number.GetDecimalIeee754HashCode<Decimal32, uint>(_value); 272public static uint EncodeDecimal(Decimal32 x) => Number.EncodeDecimalIeee754<Decimal32, uint>(x._value); 278public static Decimal32 DecodeDecimal(uint x) => new Decimal32(Number.DecodeDecimalIeee754<Decimal32, uint>(x)); 285return Number.FormatDecimalIeee754<Decimal32, uint>(_value, null, NumberFormatInfo.CurrentInfo); 293return Number.FormatDecimalIeee754<Decimal32, uint>(_value, format, NumberFormatInfo.CurrentInfo); 301return Number.FormatDecimalIeee754<Decimal32, uint>(_value, null, NumberFormatInfo.GetInstance(provider)); 309return Number.FormatDecimalIeee754<Decimal32, uint>(_value, format, NumberFormatInfo.GetInstance(provider)); 315return Number.TryFormatDecimalIeee754<Decimal32, uint, char>(_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 321return Number.TryFormatDecimalIeee754<Decimal32, uint, byte>(_value, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 339return new Decimal32(Number.AddDecimalIeee754<Decimal32, uint>(value._value, OneValue)); 347return new Decimal32(Number.SubtractDecimalIeee754<Decimal32, uint>(value._value, OneValue)); 356return new Decimal32(Number.AddDecimalIeee754<Decimal32, uint>(left._value, right._value)); 365return new Decimal32(Number.SubtractDecimalIeee754<Decimal32, uint>(left._value, right._value)); 374return new Decimal32(Number.MultiplyDecimalIeee754<Decimal32, uint>(left._value, right._value)); 383return new Decimal32(Number.DivideDecimalIeee754<Decimal32, uint>(left._value, right._value)); 392return new Decimal32(Number.RemainderDecimalIeee754<Decimal32, uint>(left._value, right._value)); 402public static explicit operator Decimal32(int value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, int>(value)); 408public static explicit operator Decimal32(uint value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, uint>(value)); 413public static explicit operator Decimal32(nint value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, nint>(value)); 419public static explicit operator Decimal32(nuint value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, nuint>(value)); 424public static explicit operator Decimal32(long value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, long>(value)); 430public static explicit operator Decimal32(ulong value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, ulong>(value)); 435public static explicit operator Decimal32(Int128 value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, Int128>(value)); 441public static explicit operator Decimal32(UInt128 value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, UInt128>(value)); 446public static explicit operator Decimal32(Half value) => new Decimal32(Number.ConvertFloatToDecimalIeee754<Half, Decimal32, uint>(value)); 451public static explicit operator Decimal32(float value) => new Decimal32(Number.ConvertFloatToDecimalIeee754<float, Decimal32, uint>(value)); 456public static explicit operator Decimal32(double value) => new Decimal32(Number.ConvertFloatToDecimalIeee754<double, Decimal32, uint>(value)); 461public static explicit operator Decimal32(Decimal64 value) => new Decimal32(Number.ConvertDecimalIeee754<Decimal64, ulong, Decimal32, uint>(value._value)); 466public static explicit operator Decimal32(Decimal128 value) => new Decimal32(Number.ConvertDecimalIeee754<Decimal128, UInt128, Decimal32, uint>(new UInt128(value._upper, value._lower))); 471public static explicit operator Decimal32(decimal value) => new Decimal32(Number.ConvertDecimalToDecimalIeee754<Decimal32, uint>(value)); 480public static explicit operator byte(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, byte>(value._value, isChecked: false); 486public static explicit operator checked byte(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, byte>(value._value, isChecked: true); 492public static explicit operator sbyte(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, sbyte>(value._value, isChecked: false); 499public static explicit operator checked sbyte(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, sbyte>(value._value, isChecked: true); 504public static explicit operator char(Decimal32 value) => (char)Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, ushort>(value._value, isChecked: false); 510public static explicit operator checked char(Decimal32 value) => (char)Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, ushort>(value._value, isChecked: true); 515public static explicit operator short(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, short>(value._value, isChecked: false); 521public static explicit operator checked short(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, short>(value._value, isChecked: true); 527public static explicit operator ushort(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, ushort>(value._value, isChecked: false); 534public static explicit operator checked ushort(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, ushort>(value._value, isChecked: true); 539public static explicit operator int(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, int>(value._value, isChecked: false); 545public static explicit operator checked int(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, int>(value._value, isChecked: true); 551public static explicit operator uint(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, uint>(value._value, isChecked: false); 558public static explicit operator checked uint(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, uint>(value._value, isChecked: true); 563public static explicit operator nint(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, nint>(value._value, isChecked: false); 569public static explicit operator checked nint(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, nint>(value._value, isChecked: true); 575public static explicit operator nuint(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, nuint>(value._value, isChecked: false); 582public static explicit operator checked nuint(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, nuint>(value._value, isChecked: true); 587public static explicit operator long(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, long>(value._value, isChecked: false); 593public static explicit operator checked long(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, long>(value._value, isChecked: true); 599public static explicit operator ulong(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, ulong>(value._value, isChecked: false); 606public static explicit operator checked ulong(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, ulong>(value._value, isChecked: true); 611public static explicit operator Int128(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, Int128>(value._value, isChecked: false); 617public static explicit operator checked Int128(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, Int128>(value._value, isChecked: true); 623public static explicit operator UInt128(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, UInt128>(value._value, isChecked: false); 630public static explicit operator checked UInt128(Decimal32 value) => Number.ConvertDecimalIeee754ToInteger<Decimal32, uint, UInt128>(value._value, isChecked: true); 635public static explicit operator Half(Decimal32 value) => Number.ConvertDecimalIeee754ToFloat<Decimal32, uint, Half>(value._value); 640public static explicit operator float(Decimal32 value) => Number.ConvertDecimalIeee754ToFloat<Decimal32, uint, float>(value._value); 645public static explicit operator double(Decimal32 value) => Number.ConvertDecimalIeee754ToFloat<Decimal32, uint, double>(value._value); 651public static explicit operator decimal(Decimal32 value) => Number.ConvertDecimalIeee754ToDecimal<Decimal32, uint>(value._value); 660public static implicit operator Decimal32(byte value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, byte>(value)); 666public static implicit operator Decimal32(sbyte value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, sbyte>(value)); 671public static implicit operator Decimal32(char value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, ushort>(value)); 676public static implicit operator Decimal32(short value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, short>(value)); 682public static implicit operator Decimal32(ushort value) => new Decimal32(Number.ConvertIntegerToDecimalIeee754<Decimal32, uint, ushort>(value)); 691public static implicit operator Decimal64(Decimal32 value) => new Decimal64(Number.ConvertDecimalIeee754<Decimal32, uint, Decimal64, ulong>(value._value)); 696public static implicit operator Decimal128(Decimal32 value) => new Decimal128(Number.ConvertDecimalIeee754<Decimal32, uint, Decimal128, UInt128>(value._value)); 704return Number.EqualsDecimalIeee754<Decimal32, uint>(left._value, right._value); 722return Number.LessThanDecimalIeee754<Decimal32, uint>(left._value, right._value); 731return Number.GreaterThanDecimalIeee754<Decimal32, uint>(left._value, right._value); 740return Number.LessThanOrEqualDecimalIeee754<Decimal32, uint>(left._value, right._value); 749return Number.GreaterThanOrEqualDecimalIeee754<Decimal32, uint>(left._value, right._value); 760return Number.TryParseDecimalIeee754<char, Decimal32, uint>(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 767return Number.TryParseDecimalIeee754<char, Decimal32, uint>(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 774return Number.TryParseDecimalIeee754<byte, Decimal32, uint>(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 789return Number.ParseDecimalIeee754<byte, Decimal32, uint>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 796public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal32 result) => Number.TryParseDecimalIeee754<byte, Decimal32, uint>(utf8Text, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 818public static Decimal32 Ceiling(Decimal32 x) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, 0, MidpointRounding.ToPositiveInfinity)); 829public static Decimal32 Floor(Decimal32 x) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, 0, MidpointRounding.ToNegativeInfinity)); 832public static Decimal32 Round(Decimal32 x) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, 0, MidpointRounding.ToEven)); 835public static Decimal32 Round(Decimal32 x, int digits) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, digits, MidpointRounding.ToEven)); 838public static Decimal32 Round(Decimal32 x, MidpointRounding mode) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, 0, mode)); 841public static Decimal32 Round(Decimal32 x, int digits, MidpointRounding mode) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, digits, mode)); 844public static Decimal32 Truncate(Decimal32 x) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, 0, MidpointRounding.ToZero)); 852int exponent = Number.UnpackDecimalIeee754<Decimal32, uint>(_value).UnbiasedExponent; 873if (BinaryPrimitives.TryWriteInt32BigEndian(destination, Number.UnpackDecimalIeee754<Decimal32, uint>(_value).UnbiasedExponent)) 886if (BinaryPrimitives.TryWriteInt32LittleEndian(destination, Number.UnpackDecimalIeee754<Decimal32, uint>(_value).UnbiasedExponent)) 899if (BinaryPrimitives.TryWriteUInt32BigEndian(destination, Number.UnpackDecimalIeee754<Decimal32, uint>(_value).Significand)) 912if (BinaryPrimitives.TryWriteUInt32LittleEndian(destination, Number.UnpackDecimalIeee754<Decimal32, uint>(_value).Significand)) 927public static Decimal32 Acos(Decimal32 x) => new Decimal32(Number.AcosDecimalIeee754<Decimal32, uint>(x._value)); 930public static Decimal32 AcosPi(Decimal32 x) => new Decimal32(Number.AcosPiDecimalIeee754<Decimal32, uint>(x._value)); 933public static Decimal32 Acosh(Decimal32 x) => new Decimal32(Number.AcoshDecimalIeee754<Decimal32, uint>(x._value)); 936public static Decimal32 Asin(Decimal32 x) => new Decimal32(Number.AsinDecimalIeee754<Decimal32, uint>(x._value)); 939public static Decimal32 AsinPi(Decimal32 x) => new Decimal32(Number.AsinPiDecimalIeee754<Decimal32, uint>(x._value)); 942public static Decimal32 Asinh(Decimal32 x) => new Decimal32(Number.AsinhDecimalIeee754<Decimal32, uint>(x._value)); 945public static Decimal32 Atan(Decimal32 x) => new Decimal32(Number.AtanDecimalIeee754<Decimal32, uint>(x._value)); 948public static Decimal32 Atan2(Decimal32 y, Decimal32 x) => new Decimal32(Number.Atan2DecimalIeee754<Decimal32, uint>(y._value, x._value)); 951public static Decimal32 Atan2Pi(Decimal32 y, Decimal32 x) => new Decimal32(Number.Atan2PiDecimalIeee754<Decimal32, uint>(y._value, x._value)); 954public static Decimal32 AtanPi(Decimal32 x) => new Decimal32(Number.AtanPiDecimalIeee754<Decimal32, uint>(x._value)); 957public static Decimal32 Atanh(Decimal32 x) => new Decimal32(Number.AtanhDecimalIeee754<Decimal32, uint>(x._value)); 960public static Decimal32 BitDecrement(Decimal32 x) => new Decimal32(Number.BitDecrementDecimalIeee754<Decimal32, uint>(x._value)); 963public static Decimal32 BitIncrement(Decimal32 x) => new Decimal32(Number.BitIncrementDecimalIeee754<Decimal32, uint>(x._value)); 966public static Decimal32 Cbrt(Decimal32 x) => new Decimal32(Number.CbrtDecimalIeee754<Decimal32, uint>(x._value)); 969public static Decimal32 Cos(Decimal32 x) => new Decimal32(Number.CosDecimalIeee754<Decimal32, uint>(x._value)); 972public static Decimal32 CosPi(Decimal32 x) => new Decimal32(Number.CosPiDecimalIeee754<Decimal32, uint>(x._value)); 975public static Decimal32 Cosh(Decimal32 x) => new Decimal32(Number.CoshDecimalIeee754<Decimal32, uint>(x._value)); 978public static Decimal32 Exp(Decimal32 x) => new Decimal32(Number.ExpDecimalIeee754<Decimal32, uint>(x._value)); 981public static Decimal32 Exp10(Decimal32 x) => new Decimal32(Number.Exp10DecimalIeee754<Decimal32, uint>(x._value)); 984public static Decimal32 Exp10M1(Decimal32 x) => new Decimal32(Number.Exp10M1DecimalIeee754<Decimal32, uint>(x._value)); 987public static Decimal32 Exp2(Decimal32 x) => new Decimal32(Number.Exp2DecimalIeee754<Decimal32, uint>(x._value)); 990public static Decimal32 Exp2M1(Decimal32 x) => new Decimal32(Number.Exp2M1DecimalIeee754<Decimal32, uint>(x._value)); 993public static Decimal32 ExpM1(Decimal32 x) => new Decimal32(Number.ExpM1DecimalIeee754<Decimal32, uint>(x._value)); 996public static Decimal32 FusedMultiplyAdd(Decimal32 left, Decimal32 right, Decimal32 addend) => new Decimal32(Number.FusedMultiplyAddDecimalIeee754<Decimal32, uint>(left._value, right._value, addend._value)); 999public static Decimal32 Hypot(Decimal32 x, Decimal32 y) => new Decimal32(Number.HypotDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1002public static Decimal32 Ieee754Remainder(Decimal32 left, Decimal32 right) => new Decimal32(Number.Ieee754RemainderDecimalIeee754<Decimal32, uint>(left._value, right._value)); 1005public static int ILogB(Decimal32 x) => Number.ILogBDecimalIeee754<Decimal32, uint>(x._value); 1011public static Decimal32 Log(Decimal32 x) => new Decimal32(Number.LogDecimalIeee754<Decimal32, uint>(x._value)); 1014public static Decimal32 Log(Decimal32 x, Decimal32 newBase) => new Decimal32(Number.LogDecimalIeee754<Decimal32, uint>(x._value, newBase._value)); 1017public static Decimal32 Log10(Decimal32 x) => new Decimal32(Number.Log10DecimalIeee754<Decimal32, uint>(x._value)); 1020public static Decimal32 Log10P1(Decimal32 x) => new Decimal32(Number.Log10P1DecimalIeee754<Decimal32, uint>(x._value)); 1023public static Decimal32 Log2(Decimal32 x) => new Decimal32(Number.Log2DecimalIeee754<Decimal32, uint>(x._value)); 1026public static Decimal32 Log2P1(Decimal32 x) => new Decimal32(Number.Log2P1DecimalIeee754<Decimal32, uint>(x._value)); 1029public static Decimal32 LogP1(Decimal32 x) => new Decimal32(Number.LogP1DecimalIeee754<Decimal32, uint>(x._value)); 1032public static Decimal32 Pow(Decimal32 x, Decimal32 y) => new Decimal32(Number.PowDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1041public static Decimal32 RootN(Decimal32 x, int n) => new Decimal32(Number.RootNDecimalIeee754<Decimal32, uint>(x._value, n)); 1044public static Decimal32 ScaleB(Decimal32 x, int n) => new Decimal32(Number.ScaleBDecimalIeee754<Decimal32, uint>(x._value, n)); 1047public static Decimal32 Sin(Decimal32 x) => new Decimal32(Number.SinDecimalIeee754<Decimal32, uint>(x._value)); 1052(uint sin, uint cos) = Number.SinCosDecimalIeee754<Decimal32, uint>(x._value); 1059(uint sin, uint cos) = Number.SinCosPiDecimalIeee754<Decimal32, uint>(x._value); 1064public static Decimal32 SinPi(Decimal32 x) => new Decimal32(Number.SinPiDecimalIeee754<Decimal32, uint>(x._value)); 1067public static Decimal32 Sinh(Decimal32 x) => new Decimal32(Number.SinhDecimalIeee754<Decimal32, uint>(x._value)); 1070public static Decimal32 Sqrt(Decimal32 x) => new Decimal32(Number.SqrtDecimalIeee754<Decimal32, uint>(x._value)); 1073public static Decimal32 Tan(Decimal32 x) => new Decimal32(Number.TanDecimalIeee754<Decimal32, uint>(x._value)); 1076public static Decimal32 TanPi(Decimal32 x) => new Decimal32(Number.TanPiDecimalIeee754<Decimal32, uint>(x._value)); 1079public static Decimal32 Tanh(Decimal32 x) => new Decimal32(Number.TanhDecimalIeee754<Decimal32, uint>(x._value)); 1085public static Decimal32 Quantize(Decimal32 x, Decimal32 y) => new Decimal32(Number.QuantizeDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1090public static Decimal32 GetQuantum(Decimal32 x) => new Decimal32(Number.QuantumDecimalIeee754<Decimal32, uint>(x._value)); 1096public static bool HaveSameQuantum(Decimal32 x, Decimal32 y) => Number.SameQuantumDecimalIeee754<Decimal32, uint>(x._value, y._value); 1101public static Decimal32 Abs(Decimal32 value) => new Decimal32(Number.AbsDecimalIeee754<Decimal32, uint>(value._value)); 1146public static bool IsInteger(Decimal32 value) => Number.IsIntegerDecimalIeee754<Decimal32, uint>(value._value); 1151public static bool IsEvenInteger(Decimal32 value) => Number.IsEvenIntegerDecimalIeee754<Decimal32, uint>(value._value); 1156public static bool IsOddInteger(Decimal32 value) => Number.IsOddIntegerDecimalIeee754<Decimal32, uint>(value._value); 1161public static bool IsNormal(Decimal32 value) => Number.IsNormalDecimalIeee754<Decimal32, uint>(value._value); 1166public static bool IsSubnormal(Decimal32 value) => Number.IsSubnormalDecimalIeee754<Decimal32, uint>(value._value); 1172public static Decimal32 MaxMagnitude(Decimal32 x, Decimal32 y) => new Decimal32(Number.MaxMagnitudeDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1178public static Decimal32 MaxMagnitudeNumber(Decimal32 x, Decimal32 y) => new Decimal32(Number.MaxMagnitudeNumberDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1184public static Decimal32 MinMagnitude(Decimal32 x, Decimal32 y) => new Decimal32(Number.MinMagnitudeDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1190public static Decimal32 MinMagnitudeNumber(Decimal32 x, Decimal32 y) => new Decimal32(Number.MinMagnitudeNumberDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1233public static Decimal32 CopySign(Decimal32 value, Decimal32 sign) => new Decimal32(Number.CopySignDecimalIeee754<Decimal32, uint>(value._value, sign._value)); 1239public static Decimal32 Max(Decimal32 x, Decimal32 y) => new Decimal32(Number.MaxDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1245public static Decimal32 MaxNative(Decimal32 x, Decimal32 y) => new Decimal32(Number.MaxNativeDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1251public static Decimal32 MaxNumber(Decimal32 x, Decimal32 y) => new Decimal32(Number.MaxNumberDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1257public static Decimal32 Min(Decimal32 x, Decimal32 y) => new Decimal32(Number.MinDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1263public static Decimal32 MinNative(Decimal32 x, Decimal32 y) => new Decimal32(Number.MinNativeDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1269public static Decimal32 MinNumber(Decimal32 x, Decimal32 y) => new Decimal32(Number.MinNumberDecimalIeee754<Decimal32, uint>(x._value, y._value)); 1275public static int Sign(Decimal32 value) => Number.SignDecimalIeee754<Decimal32, uint>(value._value); 1281static bool INumberBase<Decimal32>.IsCanonical(Decimal32 value) => Number.IsCanonicalDecimalIeee754<Decimal32, uint>(value._value, nanReservedMask: 0x01F0_0000, nanPayloadMask: NaNPayloadMask, maxNaNPayload: 999_999); 1290static bool INumberBase<Decimal32>.IsZero(Decimal32 value) => Number.IsZeroDecimalIeee754<Decimal32, uint>(value._value); 1730static int IDecimalIeee754ParseAndFormatInfo<Decimal32, uint>.BufferLength => Number.Decimal32NumberBufferLength; 1734return Number.UInt32ToDecStr(significand); 1737static unsafe uint IDecimalIeee754ParseAndFormatInfo<Decimal32, uint>.NumberToSignificand(ref Number.NumberBuffer number, int digits) 1739return Number.DigitsToUInt32(number.DigitsPtr, digits);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (174)
144return Number.ParseDecimalIeee754<char, Decimal64, ulong>(s, style, NumberFormatInfo.GetInstance(provider)); 202return Number.TryParseDecimalIeee754<char, Decimal64, ulong>(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 216return Number.TryParseDecimalIeee754<char, Decimal64, ulong>(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 232return Number.CompareDecimalIeee754<Decimal64, ulong>(_value, other._value); 238return Number.CompareDecimalIeee754<Decimal64, ulong>(_value, other._value) == 0; 254return Number.GetDecimalIeee754HashCode<Decimal64, ulong>(_value); 273public static ulong EncodeDecimal(Decimal64 x) => Number.EncodeDecimalIeee754<Decimal64, ulong>(x._value); 279public static Decimal64 DecodeDecimal(ulong x) => new Decimal64(Number.DecodeDecimalIeee754<Decimal64, ulong>(x)); 286return Number.FormatDecimalIeee754<Decimal64, ulong>(_value, null, NumberFormatInfo.CurrentInfo); 294return Number.FormatDecimalIeee754<Decimal64, ulong>(_value, format, NumberFormatInfo.CurrentInfo); 302return Number.FormatDecimalIeee754<Decimal64, ulong>(_value, null, NumberFormatInfo.GetInstance(provider)); 310return Number.FormatDecimalIeee754<Decimal64, ulong>(_value, format, NumberFormatInfo.GetInstance(provider)); 316return Number.TryFormatDecimalIeee754<Decimal64, ulong, char>(_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 322return Number.TryFormatDecimalIeee754<Decimal64, ulong, byte>(_value, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 340return new Decimal64(Number.AddDecimalIeee754<Decimal64, ulong>(value._value, OneValue)); 348return new Decimal64(Number.SubtractDecimalIeee754<Decimal64, ulong>(value._value, OneValue)); 357return new Decimal64(Number.AddDecimalIeee754<Decimal64, ulong>(left._value, right._value)); 366return new Decimal64(Number.SubtractDecimalIeee754<Decimal64, ulong>(left._value, right._value)); 375return new Decimal64(Number.MultiplyDecimalIeee754<Decimal64, ulong>(left._value, right._value)); 384return new Decimal64(Number.DivideDecimalIeee754<Decimal64, ulong>(left._value, right._value)); 393return new Decimal64(Number.RemainderDecimalIeee754<Decimal64, ulong>(left._value, right._value)); 403public static explicit operator Decimal64(nint value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, nint>(value)); 409public static explicit operator Decimal64(nuint value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, nuint>(value)); 414public static explicit operator Decimal64(long value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, long>(value)); 420public static explicit operator Decimal64(ulong value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, ulong>(value)); 425public static explicit operator Decimal64(Int128 value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, Int128>(value)); 431public static explicit operator Decimal64(UInt128 value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, UInt128>(value)); 436public static explicit operator Decimal64(Half value) => new Decimal64(Number.ConvertFloatToDecimalIeee754<Half, Decimal64, ulong>(value)); 441public static explicit operator Decimal64(float value) => new Decimal64(Number.ConvertFloatToDecimalIeee754<float, Decimal64, ulong>(value)); 446public static explicit operator Decimal64(double value) => new Decimal64(Number.ConvertFloatToDecimalIeee754<double, Decimal64, ulong>(value)); 451public static explicit operator Decimal64(Decimal128 value) => new Decimal64(Number.ConvertDecimalIeee754<Decimal128, UInt128, Decimal64, ulong>(new UInt128(value._upper, value._lower))); 456public static explicit operator Decimal64(decimal value) => new Decimal64(Number.ConvertDecimalToDecimalIeee754<Decimal64, ulong>(value)); 465public static explicit operator byte(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, byte>(value._value, isChecked: false); 471public static explicit operator checked byte(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, byte>(value._value, isChecked: true); 477public static explicit operator sbyte(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, sbyte>(value._value, isChecked: false); 484public static explicit operator checked sbyte(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, sbyte>(value._value, isChecked: true); 489public static explicit operator char(Decimal64 value) => (char)Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, ushort>(value._value, isChecked: false); 495public static explicit operator checked char(Decimal64 value) => (char)Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, ushort>(value._value, isChecked: true); 500public static explicit operator short(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, short>(value._value, isChecked: false); 506public static explicit operator checked short(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, short>(value._value, isChecked: true); 512public static explicit operator ushort(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, ushort>(value._value, isChecked: false); 519public static explicit operator checked ushort(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, ushort>(value._value, isChecked: true); 524public static explicit operator int(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, int>(value._value, isChecked: false); 530public static explicit operator checked int(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, int>(value._value, isChecked: true); 536public static explicit operator uint(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, uint>(value._value, isChecked: false); 543public static explicit operator checked uint(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, uint>(value._value, isChecked: true); 548public static explicit operator nint(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, nint>(value._value, isChecked: false); 554public static explicit operator checked nint(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, nint>(value._value, isChecked: true); 560public static explicit operator nuint(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, nuint>(value._value, isChecked: false); 567public static explicit operator checked nuint(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, nuint>(value._value, isChecked: true); 572public static explicit operator long(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, long>(value._value, isChecked: false); 578public static explicit operator checked long(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, long>(value._value, isChecked: true); 584public static explicit operator ulong(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, ulong>(value._value, isChecked: false); 591public static explicit operator checked ulong(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, ulong>(value._value, isChecked: true); 596public static explicit operator Int128(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, Int128>(value._value, isChecked: false); 602public static explicit operator checked Int128(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, Int128>(value._value, isChecked: true); 608public static explicit operator UInt128(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, UInt128>(value._value, isChecked: false); 615public static explicit operator checked UInt128(Decimal64 value) => Number.ConvertDecimalIeee754ToInteger<Decimal64, ulong, UInt128>(value._value, isChecked: true); 620public static explicit operator Half(Decimal64 value) => Number.ConvertDecimalIeee754ToFloat<Decimal64, ulong, Half>(value._value); 625public static explicit operator float(Decimal64 value) => Number.ConvertDecimalIeee754ToFloat<Decimal64, ulong, float>(value._value); 630public static explicit operator double(Decimal64 value) => Number.ConvertDecimalIeee754ToFloat<Decimal64, ulong, double>(value._value); 636public static explicit operator decimal(Decimal64 value) => Number.ConvertDecimalIeee754ToDecimal<Decimal64, ulong>(value._value); 645public static implicit operator Decimal64(byte value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, byte>(value)); 651public static implicit operator Decimal64(sbyte value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, sbyte>(value)); 656public static implicit operator Decimal64(char value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, ushort>(value)); 661public static implicit operator Decimal64(short value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, short>(value)); 667public static implicit operator Decimal64(ushort value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, ushort>(value)); 672public static implicit operator Decimal64(int value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, int>(value)); 678public static implicit operator Decimal64(uint value) => new Decimal64(Number.ConvertIntegerToDecimalIeee754<Decimal64, ulong, uint>(value)); 687public static implicit operator Decimal128(Decimal64 value) => new Decimal128(Number.ConvertDecimalIeee754<Decimal64, ulong, Decimal128, UInt128>(value._value)); 695return Number.EqualsDecimalIeee754<Decimal64, ulong>(left._value, right._value); 713return Number.LessThanDecimalIeee754<Decimal64, ulong>(left._value, right._value); 722return Number.GreaterThanDecimalIeee754<Decimal64, ulong>(left._value, right._value); 731return Number.LessThanOrEqualDecimalIeee754<Decimal64, ulong>(left._value, right._value); 740return Number.GreaterThanOrEqualDecimalIeee754<Decimal64, ulong>(left._value, right._value); 751return Number.TryParseDecimalIeee754<char, Decimal64, ulong>(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 758return Number.TryParseDecimalIeee754<char, Decimal64, ulong>(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 765return Number.TryParseDecimalIeee754<byte, Decimal64, ulong>(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 780return Number.ParseDecimalIeee754<byte, Decimal64, ulong>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 787public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [MaybeNullWhen(false)] out Decimal64 result) => Number.TryParseDecimalIeee754<byte, Decimal64, ulong>(utf8Text, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 809public static Decimal64 Ceiling(Decimal64 x) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, 0, MidpointRounding.ToPositiveInfinity)); 820public static Decimal64 Floor(Decimal64 x) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, 0, MidpointRounding.ToNegativeInfinity)); 823public static Decimal64 Round(Decimal64 x) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, 0, MidpointRounding.ToEven)); 826public static Decimal64 Round(Decimal64 x, int digits) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, digits, MidpointRounding.ToEven)); 829public static Decimal64 Round(Decimal64 x, MidpointRounding mode) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, 0, mode)); 832public static Decimal64 Round(Decimal64 x, int digits, MidpointRounding mode) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, digits, mode)); 835public static Decimal64 Truncate(Decimal64 x) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, 0, MidpointRounding.ToZero)); 843int exponent = Number.UnpackDecimalIeee754<Decimal64, ulong>(_value).UnbiasedExponent; 864if (BinaryPrimitives.TryWriteInt32BigEndian(destination, Number.UnpackDecimalIeee754<Decimal64, ulong>(_value).UnbiasedExponent)) 877if (BinaryPrimitives.TryWriteInt32LittleEndian(destination, Number.UnpackDecimalIeee754<Decimal64, ulong>(_value).UnbiasedExponent)) 890if (BinaryPrimitives.TryWriteUInt64BigEndian(destination, Number.UnpackDecimalIeee754<Decimal64, ulong>(_value).Significand)) 903if (BinaryPrimitives.TryWriteUInt64LittleEndian(destination, Number.UnpackDecimalIeee754<Decimal64, ulong>(_value).Significand)) 918public static Decimal64 Acos(Decimal64 x) => new Decimal64(Number.AcosDecimalIeee754<Decimal64, ulong>(x._value)); 921public static Decimal64 AcosPi(Decimal64 x) => new Decimal64(Number.AcosPiDecimalIeee754<Decimal64, ulong>(x._value)); 924public static Decimal64 Acosh(Decimal64 x) => new Decimal64(Number.AcoshDecimalIeee754<Decimal64, ulong>(x._value)); 927public static Decimal64 Asin(Decimal64 x) => new Decimal64(Number.AsinDecimalIeee754<Decimal64, ulong>(x._value)); 930public static Decimal64 AsinPi(Decimal64 x) => new Decimal64(Number.AsinPiDecimalIeee754<Decimal64, ulong>(x._value)); 933public static Decimal64 Asinh(Decimal64 x) => new Decimal64(Number.AsinhDecimalIeee754<Decimal64, ulong>(x._value)); 936public static Decimal64 Atan(Decimal64 x) => new Decimal64(Number.AtanDecimalIeee754<Decimal64, ulong>(x._value)); 939public static Decimal64 Atan2(Decimal64 y, Decimal64 x) => new Decimal64(Number.Atan2DecimalIeee754<Decimal64, ulong>(y._value, x._value)); 942public static Decimal64 Atan2Pi(Decimal64 y, Decimal64 x) => new Decimal64(Number.Atan2PiDecimalIeee754<Decimal64, ulong>(y._value, x._value)); 945public static Decimal64 AtanPi(Decimal64 x) => new Decimal64(Number.AtanPiDecimalIeee754<Decimal64, ulong>(x._value)); 948public static Decimal64 Atanh(Decimal64 x) => new Decimal64(Number.AtanhDecimalIeee754<Decimal64, ulong>(x._value)); 951public static Decimal64 BitDecrement(Decimal64 x) => new Decimal64(Number.BitDecrementDecimalIeee754<Decimal64, ulong>(x._value)); 954public static Decimal64 BitIncrement(Decimal64 x) => new Decimal64(Number.BitIncrementDecimalIeee754<Decimal64, ulong>(x._value)); 957public static Decimal64 Cbrt(Decimal64 x) => new Decimal64(Number.CbrtDecimalIeee754<Decimal64, ulong>(x._value)); 960public static Decimal64 Cos(Decimal64 x) => new Decimal64(Number.CosDecimalIeee754<Decimal64, ulong>(x._value)); 963public static Decimal64 CosPi(Decimal64 x) => new Decimal64(Number.CosPiDecimalIeee754<Decimal64, ulong>(x._value)); 966public static Decimal64 Cosh(Decimal64 x) => new Decimal64(Number.CoshDecimalIeee754<Decimal64, ulong>(x._value)); 969public static Decimal64 Exp(Decimal64 x) => new Decimal64(Number.ExpDecimalIeee754<Decimal64, ulong>(x._value)); 972public static Decimal64 Exp10(Decimal64 x) => new Decimal64(Number.Exp10DecimalIeee754<Decimal64, ulong>(x._value)); 975public static Decimal64 Exp10M1(Decimal64 x) => new Decimal64(Number.Exp10M1DecimalIeee754<Decimal64, ulong>(x._value)); 978public static Decimal64 Exp2(Decimal64 x) => new Decimal64(Number.Exp2DecimalIeee754<Decimal64, ulong>(x._value)); 981public static Decimal64 Exp2M1(Decimal64 x) => new Decimal64(Number.Exp2M1DecimalIeee754<Decimal64, ulong>(x._value)); 984public static Decimal64 ExpM1(Decimal64 x) => new Decimal64(Number.ExpM1DecimalIeee754<Decimal64, ulong>(x._value)); 987public static Decimal64 FusedMultiplyAdd(Decimal64 left, Decimal64 right, Decimal64 addend) => new Decimal64(Number.FusedMultiplyAddDecimalIeee754<Decimal64, ulong>(left._value, right._value, addend._value)); 990public static Decimal64 Hypot(Decimal64 x, Decimal64 y) => new Decimal64(Number.HypotDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 993public static Decimal64 Ieee754Remainder(Decimal64 left, Decimal64 right) => new Decimal64(Number.Ieee754RemainderDecimalIeee754<Decimal64, ulong>(left._value, right._value)); 996public static int ILogB(Decimal64 x) => Number.ILogBDecimalIeee754<Decimal64, ulong>(x._value); 1002public static Decimal64 Log(Decimal64 x) => new Decimal64(Number.LogDecimalIeee754<Decimal64, ulong>(x._value)); 1005public static Decimal64 Log(Decimal64 x, Decimal64 newBase) => new Decimal64(Number.LogDecimalIeee754<Decimal64, ulong>(x._value, newBase._value)); 1008public static Decimal64 Log10(Decimal64 x) => new Decimal64(Number.Log10DecimalIeee754<Decimal64, ulong>(x._value)); 1011public static Decimal64 Log10P1(Decimal64 x) => new Decimal64(Number.Log10P1DecimalIeee754<Decimal64, ulong>(x._value)); 1014public static Decimal64 Log2(Decimal64 x) => new Decimal64(Number.Log2DecimalIeee754<Decimal64, ulong>(x._value)); 1017public static Decimal64 Log2P1(Decimal64 x) => new Decimal64(Number.Log2P1DecimalIeee754<Decimal64, ulong>(x._value)); 1020public static Decimal64 LogP1(Decimal64 x) => new Decimal64(Number.LogP1DecimalIeee754<Decimal64, ulong>(x._value)); 1023public static Decimal64 Pow(Decimal64 x, Decimal64 y) => new Decimal64(Number.PowDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1032public static Decimal64 RootN(Decimal64 x, int n) => new Decimal64(Number.RootNDecimalIeee754<Decimal64, ulong>(x._value, n)); 1035public static Decimal64 ScaleB(Decimal64 x, int n) => new Decimal64(Number.ScaleBDecimalIeee754<Decimal64, ulong>(x._value, n)); 1038public static Decimal64 Sin(Decimal64 x) => new Decimal64(Number.SinDecimalIeee754<Decimal64, ulong>(x._value)); 1043(ulong sin, ulong cos) = Number.SinCosDecimalIeee754<Decimal64, ulong>(x._value); 1050(ulong sin, ulong cos) = Number.SinCosPiDecimalIeee754<Decimal64, ulong>(x._value); 1055public static Decimal64 SinPi(Decimal64 x) => new Decimal64(Number.SinPiDecimalIeee754<Decimal64, ulong>(x._value)); 1058public static Decimal64 Sinh(Decimal64 x) => new Decimal64(Number.SinhDecimalIeee754<Decimal64, ulong>(x._value)); 1061public static Decimal64 Sqrt(Decimal64 x) => new Decimal64(Number.SqrtDecimalIeee754<Decimal64, ulong>(x._value)); 1064public static Decimal64 Tan(Decimal64 x) => new Decimal64(Number.TanDecimalIeee754<Decimal64, ulong>(x._value)); 1067public static Decimal64 TanPi(Decimal64 x) => new Decimal64(Number.TanPiDecimalIeee754<Decimal64, ulong>(x._value)); 1070public static Decimal64 Tanh(Decimal64 x) => new Decimal64(Number.TanhDecimalIeee754<Decimal64, ulong>(x._value)); 1076public static Decimal64 Quantize(Decimal64 x, Decimal64 y) => new Decimal64(Number.QuantizeDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1081public static Decimal64 GetQuantum(Decimal64 x) => new Decimal64(Number.QuantumDecimalIeee754<Decimal64, ulong>(x._value)); 1087public static bool HaveSameQuantum(Decimal64 x, Decimal64 y) => Number.SameQuantumDecimalIeee754<Decimal64, ulong>(x._value, y._value); 1092public static Decimal64 Abs(Decimal64 value) => new Decimal64(Number.AbsDecimalIeee754<Decimal64, ulong>(value._value)); 1137public static bool IsInteger(Decimal64 value) => Number.IsIntegerDecimalIeee754<Decimal64, ulong>(value._value); 1142public static bool IsEvenInteger(Decimal64 value) => Number.IsEvenIntegerDecimalIeee754<Decimal64, ulong>(value._value); 1147public static bool IsOddInteger(Decimal64 value) => Number.IsOddIntegerDecimalIeee754<Decimal64, ulong>(value._value); 1152public static bool IsNormal(Decimal64 value) => Number.IsNormalDecimalIeee754<Decimal64, ulong>(value._value); 1157public static bool IsSubnormal(Decimal64 value) => Number.IsSubnormalDecimalIeee754<Decimal64, ulong>(value._value); 1163public static Decimal64 MaxMagnitude(Decimal64 x, Decimal64 y) => new Decimal64(Number.MaxMagnitudeDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1169public static Decimal64 MaxMagnitudeNumber(Decimal64 x, Decimal64 y) => new Decimal64(Number.MaxMagnitudeNumberDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1175public static Decimal64 MinMagnitude(Decimal64 x, Decimal64 y) => new Decimal64(Number.MinMagnitudeDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1181public static Decimal64 MinMagnitudeNumber(Decimal64 x, Decimal64 y) => new Decimal64(Number.MinMagnitudeNumberDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1224public static Decimal64 CopySign(Decimal64 value, Decimal64 sign) => new Decimal64(Number.CopySignDecimalIeee754<Decimal64, ulong>(value._value, sign._value)); 1230public static Decimal64 Max(Decimal64 x, Decimal64 y) => new Decimal64(Number.MaxDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1236public static Decimal64 MaxNative(Decimal64 x, Decimal64 y) => new Decimal64(Number.MaxNativeDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1242public static Decimal64 MaxNumber(Decimal64 x, Decimal64 y) => new Decimal64(Number.MaxNumberDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1248public static Decimal64 Min(Decimal64 x, Decimal64 y) => new Decimal64(Number.MinDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1254public static Decimal64 MinNative(Decimal64 x, Decimal64 y) => new Decimal64(Number.MinNativeDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1260public static Decimal64 MinNumber(Decimal64 x, Decimal64 y) => new Decimal64(Number.MinNumberDecimalIeee754<Decimal64, ulong>(x._value, y._value)); 1266public static int Sign(Decimal64 value) => Number.SignDecimalIeee754<Decimal64, ulong>(value._value); 1272static bool INumberBase<Decimal64>.IsCanonical(Decimal64 value) => Number.IsCanonicalDecimalIeee754<Decimal64, ulong>(value._value, nanReservedMask: 0x01FC_0000_0000_0000, nanPayloadMask: NaNPayloadMask, maxNaNPayload: 999_999_999_999_999); 1281static bool INumberBase<Decimal64>.IsZero(Decimal64 value) => Number.IsZeroDecimalIeee754<Decimal64, ulong>(value._value); 1721static int IDecimalIeee754ParseAndFormatInfo<Decimal64, ulong>.BufferLength => Number.Decimal64NumberBufferLength; 1725return Number.UInt64ToDecStr(significand); 1728static unsafe ulong IDecimalIeee754ParseAndFormatInfo<Decimal64, ulong>.NumberToSignificand(ref Number.NumberBuffer number, int digits) 1730return Number.DigitsToUInt64(number.DigitsPtr, digits);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\TotalOrderIeee754Comparer.cs (5)
367int result = Number.CompareDecimalIeee754<TDecimal, TValue>(xBits, yBits); 376Number.DecodedDecimalIeee754<TValue> x = Number.UnpackDecimalIeee754<TDecimal, TValue>(xBits); 377Number.DecodedDecimalIeee754<TValue> y = Number.UnpackDecimalIeee754<TDecimal, TValue>(yBits);
src\runtime\src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (12)
94Number.ThrowOverflowException<long>(); 185Number.ThrowOverflowException<sbyte>(); 190Number.ThrowOverflowException<short>(); 194Number.ThrowOverflowException<int>(); 228Number.ThrowOverflowException<long>(); 237Number.ThrowOverflowException<long>(); 255Number.ThrowOverflowException<ulong>(); 262Number.ThrowOverflowException<ulong>(); 289Number.ThrowOverflowException<int>(); 296Number.ThrowOverflowException<int>(); 314Number.ThrowOverflowException<uint>(); 321Number.ThrowOverflowException<uint>();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
1721return Number.TryParseFloat(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<NFloat, NativeType>(ref result), out charsConsumed); 1729return Number.TryParseFloat(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<NFloat, NativeType>(ref result), out charsConsumed); 1737return Number.TryParseFloat(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<NFloat, NativeType>(ref result), out bytesConsumed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (22)
103return Number.Int32ToDecStr(m_value); 113return Number.FormatInt32(m_value, 0, null, provider); 118return Number.FormatInt32(m_value, 0x000000FF, format, provider); 123return Number.TryFormatInt32(m_value, 0x000000FF, format, provider, destination, out charsWritten); 129return Number.TryFormatInt32(m_value, 0x000000FF, format, provider, utf8Destination, out bytesWritten); 147return Number.ParseBinaryInteger<char, sbyte>(s, style, NumberFormatInfo.GetInstance(provider)); 163return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 169return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1283return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1290return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1297return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1372return Number.ParseBinaryInteger<byte, sbyte>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1379return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (18)
354return Number.FormatFloat(m_value, null, NumberFormatInfo.CurrentInfo); 359return Number.FormatFloat(m_value, null, NumberFormatInfo.GetInstance(provider)); 364return Number.FormatFloat(m_value, format, NumberFormatInfo.CurrentInfo); 369return Number.FormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider)); 374return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten); 380return Number.TryFormatFloat(m_value, format, NumberFormatInfo.GetInstance(provider), utf8Destination, out bytesWritten); 409return Number.ParseFloat<char, float>(s, style, NumberFormatInfo.GetInstance(provider)); 425return Number.TryParseFloat(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _); 431return Number.TryParseFloat(s, style, NumberFormatInfo.GetInstance(provider), out result, out _); 1519return Number.TryParseFloat(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 1526return Number.TryParseFloat(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed); 1533return Number.TryParseFloat(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed); 2231return Number.ParseFloat<byte, float>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 2238return Number.TryParseFloat(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _); 2251static int IBinaryFloatParseAndFormatInfo<float>.NumberBufferLength => Number.SingleNumberBufferLength;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt128.cs (24)
102return Number.UInt128ToDecStr(this); 107return Number.FormatUInt128(this, null, provider); 112return Number.FormatUInt128(this, format, null); 117return Number.FormatUInt128(this, format, provider); 122return Number.TryFormatUInt128(this, format, provider, destination, out charsWritten); 128return Number.TryFormatUInt128(this, format, provider, utf8Destination, out bytesWritten); 146return Number.ParseBinaryInteger<char, UInt128>(s, style, NumberFormatInfo.GetInstance(provider)); 162return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 168return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 221Number.ThrowDecimalOverflowException(); 2034return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 2041return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 2048return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 2196return Number.ParseBinaryInteger<byte, UInt128>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 2203return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (23)
95return Number.UInt32ToDecStr(m_value); 100return Number.UInt32ToDecStr(m_value); 105return Number.FormatUInt32(m_value, format, null); 110return Number.FormatUInt32(m_value, format, provider); 115return Number.TryFormatUInt32(m_value, format, provider, destination, out charsWritten); 121return Number.TryFormatUInt32(m_value, format, provider, utf8Destination, out bytesWritten); 139return Number.ParseBinaryInteger<char, ushort>(s, style, NumberFormatInfo.GetInstance(provider)); 155return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 161return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1110return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1117return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1124return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1192return Number.ParseBinaryInteger<byte, ushort>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1199return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (23)
111return Number.UInt32ToDecStr(m_value); 116return Number.UInt32ToDecStr(m_value); 121return Number.FormatUInt32(m_value, format, null); 126return Number.FormatUInt32(m_value, format, provider); 131return Number.TryFormatUInt32(m_value, format, provider, destination, out charsWritten); 137return Number.TryFormatUInt32(m_value, format, provider, utf8Destination, out bytesWritten); 155return Number.ParseBinaryInteger<char, uint>(s, style, NumberFormatInfo.GetInstance(provider)); 171return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 177return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1181return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1188return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1195return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1263return Number.ParseBinaryInteger<byte, uint>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1270return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (23)
110return Number.UInt64ToDecStr(m_value); 115return Number.UInt64ToDecStr(m_value); 120return Number.FormatUInt64(m_value, format, null); 125return Number.FormatUInt64(m_value, format, provider); 130return Number.TryFormatUInt64(m_value, format, provider, destination, out charsWritten); 136return Number.TryFormatUInt64(m_value, format, provider, utf8Destination, out bytesWritten); 154return Number.ParseBinaryInteger<char, ulong>(s, style, NumberFormatInfo.GetInstance(provider)); 170return Number.TryParseBinaryInteger(s.AsSpan(), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 176return Number.TryParseBinaryInteger(s, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 1182return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1189return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1196return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out result, out bytesConsumed) == Number.ParsingStatus.OK; 1264return Number.ParseBinaryInteger<byte, ulong>(utf8Text, style, NumberFormatInfo.GetInstance(provider)); 1271return Number.TryParseBinaryInteger(utf8Text, style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (9)
1178return Number.TryParseBinaryInteger(s.AsSpan(), style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<nuint, nuint_t>(ref result), out charsConsumed) == Number.ParsingStatus.OK; 1186return Number.TryParseBinaryInteger(s, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<nuint, nuint_t>(ref result), out charsConsumed) == Number.ParsingStatus.OK; 1194return Number.TryParseBinaryInteger(utf8Text, style | Number.AllowTrailingInvalidCharacters, NumberFormatInfo.GetInstance(provider), out Unsafe.As<nuint, nuint_t>(ref result), out bytesConsumed) == Number.ParsingStatus.OK;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (7)
174Span<char> dest = stackalloc char[(4 * Number.Int32NumberBufferLength) + 3]; // at most 4 Int32s and 3 periods 433Number.ParsingStatus parseStatus = Number.TryParseBinaryIntegerStyle(component, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out parsedComponent, out _); 435if (parseStatus == Number.ParsingStatus.OK && parsedComponent >= 0) 448static void ThrowFailure(Number.ParsingStatus parseStatus, int parsedComponent, string componentName, ReadOnlySpan<TChar> originalInput) 452if (parseStatus == Number.ParsingStatus.Overflow) 454Number.ThrowOverflowException<int>();