From: Jim Meyering Date: Tue, 23 Oct 2012 10:08:58 +0000 (+0200) Subject: factor: add comments X-Git-Tag: v8.20~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8778bb18650bdca6792b17dacdfa92ea788ded2;p=thirdparty%2Fcoreutils.git factor: add comments * src/factor.c (is_square): Use active voice in comment, not passive. (factor): Add function-describing comment. (mp_factor): Likewise. --- diff --git a/src/factor.c b/src/factor.c index d38c5838cd..4c2af98118 100644 --- a/src/factor.c +++ b/src/factor.c @@ -1801,7 +1801,7 @@ isqrt2 (uintmax_t nh, uintmax_t nl) #define MAGIC65 ((uint64_t) 0x218a019866014613ULL) #define MAGIC11 0x23b -/* Returns the square root if the input is a square, otherwise 0. */ +/* Return the square root if the input is a square, otherwise 0. */ static uintmax_t _GL_ATTRIBUTE_CONST is_square (uintmax_t x) { @@ -2176,6 +2176,8 @@ factor_using_squfof (uintmax_t n1, uintmax_t n0, struct factors *factors) return false; } +/* Compute the prime factors of the 128-bit number (T1,T0), and put the + results in FACTORS. Use the algorithm selected by the global ALG. */ static void factor (uintmax_t t1, uintmax_t t0, struct factors *factors) { @@ -2206,6 +2208,8 @@ factor (uintmax_t t1, uintmax_t t0, struct factors *factors) } #if HAVE_GMP +/* Use Pollard-rho to compute the prime factors of + arbitrary-precision T, and put the results in FACTORS. */ static void mp_factor (mpz_t t, struct mp_factors *factors) {