http://plan9.bell-labs.com/cm/cs/who/dmr/primevalC.html See the above for the evolution of the code.