improved simple factorization

This commit is contained in:
2023-12-28 23:57:02 +01:00
parent c6a9a8e456
commit 40b23f19d6
2 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@
namespace LA {
template<typename N>
N primefactor(const N &x);
N primefactor(const N &x, const N &last=0);
template<typename N>
bool isprime(const N &x) {return x>1 && x==primefactor(x);}