Lines Matching +full:n +full:- +full:factor
34 * factor - factor a number into primes
38 * chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\
41 * factor [-h] [number] ...
121 while ((ch = getopt(argc, argv, "h")) != -1) in main()
130 argc -= optind; in main()
142 if (*p == '\n' || *p == '\0') in main()
147 /* Factor the arguments. */ in main()
157 * pr_fact - print the factors of a number
160 * A factor will be printed multiple times if it divides the value
168 const ubig *fact; /* The factor found. */ in pr_fact()
170 /* Firewall - catch 0 and 1. */ in pr_fact()
174 printf("1: 1\n"); in pr_fact()
178 /* Factor value. */ in pr_fact()
187 /* Look for the smallest factor. */ in pr_fact()
199 BN_set_word(bnfact, *(fact - 1)); in pr_fact()
213 /* Divide factor out until none are left. */ in pr_fact()
222 putchar('\n'); in pr_fact()
240 fprintf(stderr, "usage: factor [-h] [value ...]\n"); in usage()
246 /* pollard p-1, algorithm from Jim Gillogly, May 2000 */
359 * Scan the string from left-to-right to see if the longest substring
385 int n = 0; in convert_str2bn() local
388 if (*p == '-') in convert_str2bn()
393 n = BN_hex2bn(val, ++p); in convert_str2bn()
395 n = is_hex_str(p) ? BN_hex2bn(val, p) : BN_dec2bn(val, p); in convert_str2bn()
397 if (n == 0) in convert_str2bn()