Beispiel #1
0
/* largest prime factor: WARNING: slow recursion, only use for small numbers */
static int lpfactor(int z)
{
    int f = l2factor(z);
    if (f == 1)
    {
        return z;
    }
    return std::max(lpfactor(f), lpfactor(z/f));
}
Beispiel #2
0
/* largest prime factor: WARNING: slow recursion, only use for small numbers */
static int lpfactor(int z) {
	int f = l2factor(z);
	if (f==1) return z;
	return fft5d_fmax(lpfactor(f),lpfactor(z/f));
}