n_jacobi, n_jacobi_unsigned
Synopsis
#include <flint/ulong_extras.h>Returns the Jacobi symbol \left(\frac{x}{y}\right) for odd y (not checked), with a binary algorithm [ShaSor1993]. n_jacobi_unsigned accepts a full-limb x.
References#
- [ShaSor1993] J. Shallit and J. Sorenson, "A binary algorithm for the Jacobi symbol", ACM SIGSAM Bulletin 27 (1993), 4–11
Cite this page
The FLINT team, “n_jacobi, n_jacobi_unsigned (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_jacobi.html (generated 2026-10-20).
@misc{flint-doc-ulong-extras-n-jacobi,
author = {{The FLINT team}},
title = {{n\_jacobi, n\_jacobi\_unsigned (ulong\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ulong_extras/n_jacobi.html},
note = {Generated 2026-10-20}
}