Thought I'd also have a go at translating ch-1.pl and ch-2.pl into C.. Both C versions produce identical (non-debugging) output to my Perl originals Both ch-1.c and ch-2.c use the command-line argument processing module args.[ch], which I've tweaked slightly (adding a default value to process_onenumarg()). ch-2.c uses libgmp, the Gnu multi-precision library, to provide bigint support.