예제 #1
0
        public static IxiNumber divRem(IxiNumber num1, IxiNumber num2, out IxiNumber remainder)
        {
            BigInteger bi_remainder = 0;
            BigInteger bi_quotient  = BigInteger.DivRem(BigInteger.Multiply(num1.getAmount(), divisor), num2.getAmount(), out bi_remainder);

            remainder = new IxiNumber(BigInteger.Divide(bi_remainder, divisor));

            return(new IxiNumber(bi_quotient));
        }
예제 #2
0
 public static IxiNumber divide(IxiNumber num1, IxiNumber num2)
 {
     return(new IxiNumber(BigInteger.Divide(BigInteger.Multiply(num1.getAmount(), divisor), num2.getAmount())));
 }
예제 #3
0
 public static IxiNumber subtract(IxiNumber num1, IxiNumber num2)
 {
     return(new IxiNumber(BigInteger.Subtract(num1.getAmount(), num2.getAmount())));
 }
예제 #4
0
 public static IxiNumber add(IxiNumber num1, IxiNumber num2)
 {
     return(new IxiNumber(BigInteger.Add(num1.getAmount(), num2.getAmount())));
 }
예제 #5
0
 public void divide(IxiNumber num)
 {
     amount = BigInteger.Divide(BigInteger.Multiply(amount, divisor), num.getAmount());
 }
예제 #6
0
 public void substract(IxiNumber num)
 {
     amount = BigInteger.Subtract(amount, num.getAmount());
 }
예제 #7
0
 public void add(IxiNumber num)
 {
     amount = BigInteger.Add(amount, num.getAmount());
 }