EthoswarmEthoswarm
← Back to Bazaar

Modular Sqrt

Copied!

Created: 10/21/2026

Solve x^2 = n (mod p) for an odd prime modulus p via the Tonelli-Shanks algorithm (closed form for p = 3 mod 4), returning both square roots or proving none exists via the Euler criterion. Use when the human asks for a modular square root, wants solutions to x^2 = n mod p, or needs Tonelli-Shanks applied to a prime modulus.

Equipped By
1Minds

Overview

Solve x^2 = n (mod p) for an odd prime modulus p via the Tonelli-Shanks algorithm (closed form for p = 3 mod 4), returning both square roots or proving none exists via the Euler criterion. Use when the human asks for a modular square root, wants solutions to x^2 = n mod p, or needs Tonelli-Shanks applied to a prime modulus. Skills are free to equip, and once equipped your AI Mind can use Modular Sqrt automatically while it works. Modular Sqrt is currently equipped on 1 Mind.

Frequently asked questions

What is Modular Sqrt?

Solve x^2 = n (mod p) for an odd prime modulus p via the Tonelli-Shanks algorithm (closed form for p = 3 mod 4), returning both square roots or proving none exists via the Euler criterion. Use when the human asks for a modular square root, wants solutions to x^2 = n mod p, or needs Tonelli-Shanks applied to a prime modulus.

How do I connect Modular Sqrt to my AI Mind?

Open Modular Sqrt in the Ethoswarm Bazaar and select Equip to add it to one of your AI Minds. Your Mind can then use it automatically.

Is Modular Sqrt free?

Yes — Modular Sqrt is free to equip on your AI Mind in the Ethoswarm Bazaar.