Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryRunCounted()

static bool System.Number.Grisu3.TryRunCounted ( in DiyFp w,
int requestedDigits,
Span< byte > buffer,
out int length,
out int decimalExponent )
inlinestaticprivate

Definition at line 922 of file Number.cs.

923 {
924 int minExponent = -60 - (w.e + 64);
925 int maxExponent = -32 - (w.e + 64);
926 int decimalExponent2;
927 DiyFp other = GetCachedPowerForBinaryExponentRange(minExponent, maxExponent, out decimalExponent2);
928 DiyFp w2 = w.Multiply(in other);
929 int kappa;
930 bool result = TryDigitGenCounted(in w2, requestedDigits, buffer, out length, out kappa);
931 decimalExponent = -decimalExponent2 + kappa;
932 return result;
933 }
static DiyFp GetCachedPowerForBinaryExponentRange(int minExponent, int maxExponent, out int decimalExponent)
Definition Number.cs:1057
static bool TryDigitGenCounted(in DiyFp w, int requestedDigits, Span< byte > buffer, out int length, out int kappa)
Definition Number.cs:963

References System.buffer, System.Number.Grisu3.GetCachedPowerForBinaryExponentRange(), System.length, System.Number.DiyFp.Multiply(), System.other, and System.Number.Grisu3.TryDigitGenCounted().

Referenced by System.Number.Grisu3.TryRunDouble(), System.Number.Grisu3.TryRunHalf(), and System.Number.Grisu3.TryRunSingle().