Metraipolis › archive › dc_3634c01c9c02

Tonelli–Shanks algorithm — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-07T14:58:23.972Z
SHA-256 of the archived text
6316a2385bf25639f0a723758bac4a32afbf89769a4057e28def34614beceb06
Stable URL of this page
https://metraipolis.com/documento/dc_3634c01c9c02

How to cite

Tonelli–Shanks algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_3634c01c9c02 (Metraipolis archive dc_3634c01c9c02, sha256 6316a2385bf25639f0a723758bac4a32afbf89769a4057e28def34614beceb06)
BibTeX
@misc{dc3634c01c9c02,
  title = {Tonelli–Shanks algorithm — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_3634c01c9c02; sha256 6316a2385bf25639f0a723758bac4a32afbf89769a4057e28def34614beceb06},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

The Tonelli–Shanks algorithm (referred to by Shanks as the RESSOL algorithm) is used in modular arithmetic to solve for r in a congruence of the form r2 ≡ n (mod p), where p is a prime: that is, to find a square root of n modulo p. The Tonelli–Shanks algorithm cannot be used for composite moduli: finding square roots modulo composite numbers is a computational problem equivalent to integer factorization. An equivalent, but slightly more redundant version of this algorithm was developed by Alberto Tonelli in 1891. The version discussed here was developed independently by Daniel Shanks in 1973, who explained: My tardiness in learning of these historical references was because I had lent Volume 1 of Dickson's History to a friend and it was never returned. According to Dickson, Tonelli's algorithm can take square roots of x modulo prime powers pλ apart from primes.

Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; ricerca «algorithm»).
Fonte: Wikipedia in inglese, voce «Tonelli–Shanks algorithm» — https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm
Wikidata Q17104164 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q17104164
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1350586490, consultata il 2026-10-07T14:31:23.821Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 9077add03b782ff7bce0fc9f75ba506b17fa547d0b48ad6bdae95a2e5151be6d