code: function inverseMod(x, n) {
    var ans=expand(x, n.length);
    var s;
    s=inverseMod_(ans, n);
    return s ? trim(ans, 1) : null;
  }
docs: return (x**(-1) mod n) for bigInts x and n.  If no inverse exists, it returns null