FLINT3.7.0-dev

n_factor_one_line

Synopsis#include <flint/ulong_extras.h>
ulong n_factor_one_line(ulong n, ulong iters)source

Hart's one-line factoring algorithm [Har2012], a variant of Fermat's method. Returns a factor of n or 0. Faster than SQUFOF below about 2^{40}.

References#

  • [Har2012] Hart, William B.. (2012) A one line factoring algorithm. Journal of the Australian Mathematical Society, Volume 92 (Number 1). pp. 61-69.
Cite this page

The FLINT team, “n_factor_one_line (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_factor_one_line.html (generated 2026-10-20).