FLINT3.7.0-dev

FLINT_SWAP

Synopsis#include <flint/flint.h>
FLINT_SWAP(T, x, y)source

Swaps the values of the lvalues x and y of type T. For example, FLINT_SWAP(fmpz_poly_struct, *f, *g) exchanges two polynomials in constant time; most types also have a _swap function doing this.

Guides#

Cite this page

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