CodeSnip News
A repository for source code snippets, designed with Pascal in mind.
Brought to you by:
delphidabbler
A alternative version of the IsPrime function, named IsPrime2, has been added to the Code Snippets database. This routine is shorter than IsPrime and does not use any floating point arithmetic. Also the GCD and LCD have had bugs fixed to ensure that they always return positive results, even after passing them negative parameters. Finally the test status of IsPrime, IsPrime2 and LCD has been increaed now they have passed unit tests.
link