[fpc-pascal]isprime()
Anton Tichawa
anton.tichawa at chello.at
Fri Feb 7 22:41:44 CET 2003
Hello, List!
> I made a function of 116 lines in assembler:
>
> isprime(n: cardinal): boolean;
Sounds good.
> which returns true if a cardinal is prime, false otherwise.
> The routine is fast and uses only an array of 18 cardinals and six
> cardinals as local variables. Obviously it may be used by an external
> unit, anyhow let me know if it might not be bad the idea to implement
> the function on the compiler.
The RTL?
Does the function return false for 0 and 1?
How easy isit to upgrade for > 64 bit lengths?
MfG,
Anton Tichawa.
----------
"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte
Berechnungen einzuweben."
Doris Langley Moore: Ada, Countess of Lovelace (London 1977).
----------
Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email: anton.tichawa at chello.at
----------
More information about the fpc-pascal
mailing list