14 instantiations of DiyFp
System.Private.CoreLib (14)
src\libraries\System.Private.CoreLib\src\System\Number.DiyFp.cs (8)
46return new DiyFp(f, e); 81return new DiyFp(ac + (ad >> 32) + (bc >> 32) + (tmp >> 32), e + other.e + SignificandSize); 94return new DiyFp(f << lzcnt, e - lzcnt); 104return new DiyFp(f - other.f, e); 109mPlus = new DiyFp((f << 1) + 1, e - 1).Normalize(); 124mMinus = new DiyFp((f << 2) - 1, e - 2); 128mMinus = new DiyFp((f << 1) - 1, e - 1); 131mMinus = new DiyFp(mMinus.f << (mMinus.e - mPlus.e), mPlus.e);
src\libraries\System.Private.CoreLib\src\System\Number.Grisu3.cs (6)
527var one = new DiyFp(1UL << -w.e, w.e); 705var tooLow = new DiyFp(low.f - unit, low.e); 706var tooHigh = new DiyFp(high.f + unit, high.e); 721var one = new DiyFp(1UL << -w.e, w.e); 789unsafeInterval = new DiyFp(unsafeInterval.f * 10, unsafeInterval.e); 832return new DiyFp(CachedPowersSignificand[index], CachedPowersBinaryExponent[index]);
50 references to DiyFp
System.Private.CoreLib (50)
src\libraries\System.Private.CoreLib\src\System\Number.DiyFp.cs (12)
32public static DiyFp CreateAndGetBoundaries<TNumber>(TNumber value, out DiyFp mMinus, out DiyFp mPlus) 35var result = Create(value); 40public static DiyFp Create<TNumber>(TNumber value) 55public DiyFp Multiply(in DiyFp other) 84public DiyFp Normalize() 100public DiyFp Subtract(in DiyFp other) 107private void GetBoundaries(int implicitBitIndex, out DiyFp mMinus, out DiyFp mPlus)
src\libraries\System.Private.CoreLib\src\System\Number.Grisu3.cs (38)
338DiyFp w = DiyFp.CreateAndGetBoundaries(v, out DiyFp boundaryMinus, out DiyFp boundaryPlus).Normalize(); 343DiyFp w = DiyFp.Create(v).Normalize(); 362private static bool TryRunCounted(in DiyFp w, int requestedDigits, Span<byte> buffer, out int length, out int decimalExponent) 366int tenMkMinimalBinaryExponent = MinimalTargetExponent - (w.e + DiyFp.SignificandSize); 367int tenMkMaximalBinaryExponent = MaximalTargetExponent - (w.e + DiyFp.SignificandSize); 369DiyFp tenMk = GetCachedPowerForBinaryExponentRange(tenMkMinimalBinaryExponent, tenMkMaximalBinaryExponent, out int mk); 371Debug.Assert(MinimalTargetExponent <= (w.e + tenMk.e + DiyFp.SignificandSize)); 372Debug.Assert(MaximalTargetExponent >= (w.e + tenMk.e + DiyFp.SignificandSize)); 384DiyFp scaledW = w.Multiply(in tenMk); 410private static bool TryRunShortest(in DiyFp boundaryMinus, in DiyFp w, in DiyFp boundaryPlus, Span<byte> buffer, out int length, out int decimalExponent) 418int tenMkMinimalBinaryExponent = MinimalTargetExponent - (w.e + DiyFp.SignificandSize); 419int tenMkMaximalBinaryExponent = MaximalTargetExponent - (w.e + DiyFp.SignificandSize); 421DiyFp tenMk = GetCachedPowerForBinaryExponentRange(tenMkMinimalBinaryExponent, tenMkMaximalBinaryExponent, out int mk); 423Debug.Assert(MinimalTargetExponent <= (w.e + tenMk.e + DiyFp.SignificandSize)); 424Debug.Assert(MaximalTargetExponent >= (w.e + tenMk.e + DiyFp.SignificandSize)); 436DiyFp scaledW = w.Multiply(in tenMk); 437Debug.Assert(scaledW.e == (boundaryPlus.e + tenMk.e + DiyFp.SignificandSize)); 443DiyFp scaledBoundaryMinus = boundaryMinus.Multiply(in tenMk); 444DiyFp scaledBoundaryPlus = boundaryPlus.Multiply(in tenMk); 513private static bool TryDigitGenCounted(in DiyFp w, int requestedDigits, Span<byte> buffer, out int length, out int kappa) 527var one = new DiyFp(1UL << -w.e, w.e); 550uint divisor = BiggestPowerTen(integrals, DiyFp.SignificandSize - (-one.e), out kappa); 682private static bool TryDigitGenShortest(in DiyFp low, in DiyFp w, in DiyFp high, Span<byte> buffer, out int length, out int kappa) 705var tooLow = new DiyFp(low.f - unit, low.e); 706var tooHigh = new DiyFp(high.f + unit, high.e); 710DiyFp unsafeInterval = tooHigh.Subtract(in tooLow); 721var one = new DiyFp(1UL << -w.e, w.e); 729uint divisor = BiggestPowerTen(integrals, DiyFp.SignificandSize - (-one.e), out kappa); 818private static DiyFp GetCachedPowerForBinaryExponentRange(int minExponent, int maxExponent, out int decimalExponent) 823double k = Math.Ceiling((minExponent + DiyFp.SignificandSize - 1) * D1Log210);