* @param modulus
   * @return long
   */
  public static long longInteger_mod(long x, long modulus) {
    { long remainder = (x % modulus);

      if (remainder > 0) {
        if (modulus < 0) {
          remainder = modulus + remainder;
        }
      }
      else if (remainder < 0) {
        if (modulus > 0) {
          remainder = modulus + remainder;
        }
      }
      return (remainder);
    }
  }