public static UInt64 FromFixedPointLimitedU64(UInt64 mantissa, int numDigits) { Debug.Assert(mantissa < (1UL << 53)); return(numDigits + (Int32.MinValue + BiasedExponentMaxValue - BaseExponent) > (Int32.MinValue + BiasedExponentMaxValue) ? NativeImpl.fromFixedPoint64((Int64)mantissa, numDigits) : FromFixedPointFastUnsignedUnchecked(mantissa, numDigits)); }
public static Decimal64 FromFixedPoint(long mantissa, int numberOfDigits) { // TODO: More optimizations return(new Decimal64( 0 == (mantissa & (-1L << 53)) ? DotNetImpl.FromFixedPointLimitedU64((UInt64)mantissa, numberOfDigits) : NativeImpl.fromFixedPoint64(mantissa, numberOfDigits))); }