Looking at the [documentation](https://gmplib.org/manual/Number-Theoretic-Functions.html), 2 means prime, 1 probably prime (accurate to at least 10^(-50)), and 0 composite. So testing for 2 should be 100% accurate, but it also means that we might be calling ECM on a prime if 1 is returned.