3 implementations of CountDigits
System.Private.CoreLib (3)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (1)
1797static int IDecimalIeee754ParseAndFormatInfo<Decimal128, UInt128>.CountDigits(UInt128 significand) => FormattingHelpers.CountDigits(significand);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (1)
1769static int IDecimalIeee754ParseAndFormatInfo<Decimal32, uint>.CountDigits(uint significand) => FormattingHelpers.CountDigits(significand);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (1)
1763static int IDecimalIeee754ParseAndFormatInfo<Decimal64, ulong>.CountDigits(ulong significand) => FormattingHelpers.CountDigits(significand);
22 references to CountDigits
System.Private.CoreLib (22)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.cs (22)
28int digits = TDecimal.CountDigits(decoded.Significand); 950int nonZeroDigits = TDecimal.CountDigits(nonZero.Significand); 1003if (droppedDigits >= TDecimal.CountDigits(lo.Significand)) 1086&& (TDecimal.CountDigits(magnitudeLow) <= TDecimal.Precision)) 1349int addendDigits = TDecimal.CountDigits(addendSignificand); 1370int addendDigitsCount = addendZero ? 0 : TDecimal.CountDigits(addendSignificand); 1535int dividendDigits = TDecimal.CountDigits(a.Significand); 1536int divisorDigits = TDecimal.CountDigits(b.Significand); 1709if (TDecimal.CountDigits(b.Significand) + gap > TDecimal.Precision) 1825if (TDecimal.CountDigits(b.Significand) + gap > TDecimal.Precision + 1) 1910int guard = TDecimal.Precision + 1 - ((TDecimal.CountDigits(coefficient) + 1) / 2); 1965int coefficientDigits = TValue.IsZero(a.Significand) ? 0 : TDecimal.CountDigits(a.Significand); 2042return a.UnbiasedExponent + TDecimal.CountDigits(a.Significand) - 1; 2087if (surplus <= TDecimal.Precision - TDecimal.CountDigits(a.Significand)) 2100int coefficientDigits = TDecimal.CountDigits(a.Significand); 2185int coefficientDigits = TDecimal.CountDigits(a.Significand); 2351int padding = Math.Min(TDecimal.Precision - TDecimal.CountDigits(significand), exponent - TDecimal.MinAdjustedExponent); 2709return TDecimal.CountDigits(low); 2738return count + TDecimal.CountDigits(low); 3184int adjustedExponent = decoded.UnbiasedExponent + TDecimal.CountDigits(decoded.Significand) - 1; 3208int adjustedExponent = decoded.UnbiasedExponent + TDecimal.CountDigits(decoded.Significand) - 1; 3745int scale = TDecimal.CountDigits(decoded.Significand) + exponent;