have n_gcd take input in either order; update test and documentation