New factorization algorithm based on a continuous representation of truncated Gauss sums