flint_mpn_remove_power_ascending
Synopsis
#include <flint/mpn_extras.h>mp_size_t flint_mpn_remove_power_ascending(mp_ptr x, mp_size_t xsize, mp_ptr p, mp_size_t psize, ulong * exp)sourceDivides in place by the largest power of that divides it, stores in exp and returns the new length. must be nonzero and . The divisibility is tested by ascending squares , which is efficient for large powers but has a high overhead, so it should not be used as the first stage of trial division.
Cite this page
The FLINT team, “flint_mpn_remove_power_ascending (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_remove_power_ascending.html (generated 2026-11-02).
@misc{flint-doc-mpn-extras-flint-mpn-remove-power-ascending,
author = {{The FLINT team}},
title = {{flint\_mpn\_remove\_power\_ascending (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/flint_mpn_remove_power_ascending.html},
note = {Generated 2026-11-02}
}