up previous next
CoprimeFactor    --    determine factor of N coprime to given base


Syntax
CoprimeFactor(N: INT, b:INT): INT

Description
This function returns the largest factor of N which is coprime to b. An error is signalled if N or b is zero.

Example
/**/  CoprimeFactor(100, 5);
4
/**/  CoprimeFactor(100, 21);
100

See Also