private static void acc_realSubtract(AccurateValue n1,AccurateValue n2,AccurateValue result){
  acc_align(n1,n2);
  result.digits=new int[n1.digits.length];
  int b=n1.digits.length - 1;
  int carry=0;
  int rc=n2.acc_compareTo(n1);
  if (rc == 0) {
    return;
  }
  boolean smallerOrEqual=(rc <= 0);
  while (b >= 0) {
    int s=n1.digits[b] - n2.digits[b];
    if (!smallerOrEqual) {
      s=-s;
    }
    s+=carry;
    if (s >= 0) {
      result.digits[b]=s;
      carry=0;
    }
 else {
      carry=-1;
      result.digits[b]=s + 10;
    }
    b--;
  }
  if (!smallerOrEqual) {
    result.sign=-1;
  }
 else {
    if (carry < 0) {
      result.sign=-1;
    }
 else {
      result.sign=+1;
    }
  }
}

private static void acc_realSubtract ( AccurateValue n1 , AccurateValue n2 , AccurateValue result ) { acc_align ( n1 , n2 ) ; result . digits = new int [ n1 . digits . length ] ; int b = n1 . digits . length - 1 ; int carry = 0 ; int rc = n2 . acc_compareTo ( n1 ) ; if ( rc == 0 ) { return ; } boolean smallerOrEqual = ( rc <= 0 ) ; while ( b >= 0 ) { int s = n1 . digits [ b ] - n2 . digits [ b ] ; if ( ! smallerOrEqual ) { s = - s ; } s += carry ; if ( s >= 0 ) { result . digits [ b ] = s ; carry = 0 ; } else { carry = - 1 ; result . digits [ b ] = s + 10 ; } b -- ; } if ( ! smallerOrEqual ) { result . sign = - 1 ; } else { if ( carry < 0 ) { result . sign = - 1 ; } else { result . sign = + 1 ; } } }
subtract n2 from n1 two integers accurately .
