bi_factor(1)

NAME
bi_factor - prime-factor large numbers

SYNOPSIS
bi_factor number number-number ...

DESCRIPTION

The program will compute the prime factors of each number you give it as an argument. If no arguments are given, it will read numbers from standard input, one per line. In addition to plain number, you can also specify a range of numbers as "number-number", or you can use up to 3 trailing dots as wildcards. Here are some examples:
% bi_factor 223092871 2147483647
223092871 = 317 703763
2147483647 = 2147483647
% bi_factor 65534-65538
65534 = 2 7 31 151
65535 = 3 5 17 257
65536 = 2^16
65537 = 65537
65538 = 2 3^2 11 331
% bi_factor 123456789.
1234567890 = 2 3^2 5 3607 3803
1234567891 = 1234567891
1234567892 = 2^2 41 7527853
1234567893 = 3 13 31655587
1234567894 = 2 7 47 479 3917
1234567895 = 5 11 23 975943
1234567896 = 2^3 3 83 619763
1234567897 = 17 73 994817
1234567898 = 2 61 10119409
1234567899 = 3^4 109 139831

bi_factor uses a "bigint" library to handle numbers much larger than the usual 32-bit or 64-bit computer word size. However, the factoring algorithm that bi_factor currently uses is the slowest one around, trial division, so there's not much point in trying to factor numbers larger than 16 digits or so (which is about 53 bits).

SEE ALSO
factor(1), bigint(3)

AUTHOR
Copyright © 2000 by Jef Poskanzer <jef@mail.acme.com>. All rights reserved.