X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/1b420890ac399d1844ab6c4fe0e0e22ba8fbe3ad..0e1199ac5a1d8410608d488aaa787fb207fc3746:/math/mp.h diff --git a/math/mp.h b/math/mp.h index 23e71e36..75dfd5ba 100644 --- a/math/mp.h +++ b/math/mp.h @@ -923,6 +923,16 @@ extern mp *mp_leastcongruent(mp */*d*/, mp */*b*/, mp */*r*/, mp */*m*/); extern mp *mp_sqrt(mp */*d*/, mp */*a*/); +/* --- @mp_squarep@ --- * + * + * Arguments: @mp *n@ = an integer + * + * Returns: Nonzero if and only if @n@ is a perfect square, i.e., + * %$n = a^2$% for some rational integer %$a$%. + */ + +extern int mp_squarep(mp */*n*/); + /* --- @mp_nthrt@ --- * * * Arguments: @mp *d@ = fake destination