Perfect-square checks
=====================

The current implementation does not use decimal-digit filters, digital roots,
or Legendre-symbol prefilters for perfect-square detection.

Instead, `factorize.is_perfect_square()` uses the exact integer square-root
test:

    root = isqrt(n)
    root * root == n

If the optional `gmpy2` backend is installed, the code uses `gmpy2.is_square()`
and `gmpy2.isqrt()` for the same exact check.

Rationale
---------

The older digit-root and Legendre-symbol filters can reject many non-squares,
but they add complexity and extra dependencies. Python's built-in `math.isqrt()`
is exact, fast, and simple. The final square-root check is still required even
when filters are used, so the project now goes directly to that definitive
test.

This keeps perfect-square handling predictable for:

- direct calls to `is_perfect_square()`
- Fermat factorization, which checks whether `a*a - n` is a square
- perfect-square composites such as `49` or `99991 * 99991`
