Example #1
0
        public Decimal64 RoundToNearestTiesAwayFromZero(Decimal64 multiple)
        {
            if (!multiple.IsFinite() || multiple.IsNonPositive())
            {
                throw new ArgumentException("Multiple must be a positive finite number.");
            }
            if (IsNaN())
            {
                return(this);
            }

            UInt64 ratio = NativeImpl.roundToNearestTiesAwayFromZero(NativeImpl.divide(Bits, multiple.Bits));

            return(new Decimal64(NativeImpl.multiply2(ratio, multiple.Bits)));
        }
Example #2
0
 public static Decimal64 operator /(Decimal64 a, Decimal64 b)
 {
     return(new Decimal64(NativeImpl.divide(a.Bits, b.Bits)));
 }
Example #3
0
 public Decimal64 Divide(Decimal64 b)
 {
     return(new Decimal64(NativeImpl.divide(Bits, b.Bits)));
 }