in reply to Factoring Decimal Digits
Sample output:#! /usr/bin/perl use Math::Pari qw(:int factorint); print factorint($_), "\n" for @ARGV;
With barely a pause, even on this creaky old laptop.bash-2.01$ ./factor 491320487930121938479123 4839013210437894323 [48049,1;10225405064207828227,1] [11,2;36809477,1;1086455119,1]
It does have to think, though, about:
bash-2.01$ ./factor 4913204879301219384791234839013210437894323 [3,1;19,1;82471,1;17992995173,1;4100172797059,1;14167170962387,1]
|
---|