Fixed details of prime factorization algorithm