# Efficient computation of the Jacobi symbol

**Authors:** Niels M\"oller

arXiv: 1907.07795 · 2019-07-19

## TL;DR

This paper introduces an efficient method to compute the Jacobi symbol by extending existing GCD algorithms, achieving linear additional cost with minimal table lookups, and demonstrates its implementation in GMP.

## Contribution

It extends left-to-right GCD algorithms to compute the Jacobi symbol efficiently with a single table lookup per reduction, applicable to various algorithm complexities.

## Key findings

- Linear additional cost for Jacobi symbol computation
- Single table lookup per quotient in reduction sequence
- Implemented successfully in GMP in 2010

## Abstract

The family of left-to-right GCD algorithms reduces input numbers by repeatedly subtracting the smaller number, or multiple of the smaller number, from the larger number. This paper describes how to extend any such algorithm to compute the Jacobi symbol, using a single table lookup per reduction. For both quadratic time GCD algorithms (Euclid, Lehmer) and subquadratic algorithms (Knuth, Sch\"onhage, M\"oller), the additional cost is linear, roughly one table lookup per quotient in the quotient sequence. This method was used for the 2010 rewrite of the Jacobi symbol computation in GMP.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1907.07795/full.md

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/1907.07795/full.md

## References

9 references — full list in the complete paper: https://tomesphere.com/paper/1907.07795/full.md

---
Source: https://tomesphere.com/paper/1907.07795