FLINT3.7.0-dev

n_ll_factor_ecm

Synopsis#include <flint/ulong_extras.h>
int n_ll_factor_ecm(nn_ptr factor, ulong nhi, ulong nlo, ulong curves, ulong B1, ulong B2, flint_rand_t state)source

The elliptic curve method for an odd two-limb n with n_{hi} \ne 0, trying up to curves curves with bounds B_1, B_2 (if B_2 < B_1, then 100 B_1 is used). Returns 1 and writes a factor on success, otherwise 0.

Curves use Suyama's parametrisation. Both stages run in two-limb Montgomery arithmetic, roughly twice as fast as fmpz_factor_ecm with the same parameters for n of this size.

Cite this page

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