Extended Euclidean Algorithm

Compute GCD and Bézout coefficients with iterative Extended Euclidean Algorithm steps.

6|62|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/vicharanashala/tenali --skill extended-euclidean-algorithm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Extended Euclidean Algorithm
Source: https://github.com/vicharanashala/tenali/tree/main/supermarket/extendedeuclid
Command: npx skills add https://github.com/vicharanashala/tenali --skill extended-euclidean-algorithm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill simplifies the complex process of finding the greatest common divisor (GCD) and Bezout coefficients for two integers, which is a fundamental requirement in cryptography and number theory.

Core Features & Use Cases

  • Step-by-Step Visualization: Watch the iterative computation of the GCD and Bezout coefficients in real-time.
  • Interactive Verification: Automatically verify the identity ax + by = gcd(a, b) for any given input.
  • Use Case: Students or developers can use this to debug modular inverse calculations or understand the mechanics of the Extended Euclidean Algorithm through an interactive, step-by-step table.

Quick Start

Use the Extended Euclidean Algorithm skill to visualize the computation for integers 252 and 198.

Frequently Asked Questions about Extended Euclidean Algorithm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find Bezout coefficients and the greatest common divisor for two integers?

To find Bezout coefficients and the greatest common divisor, you can use an iterative Extended Euclidean Algorithm computation that solves the linear combination ax + by = gcd(a, b) for any two integers. The skill visualizes each division step automatically.

How does the Extended Euclidean Algorithm work step by step?

The Extended Euclidean Algorithm works by iteratively applying integer division to compute the greatest common divisor while simultaneously tracking Bezout coefficients in a visual table. You can watch each division step update the coefficients in real time.

Can I compute the modular inverse or GCD for negative integers?

Yes, you can compute the modular inverse or GCD for negative integers. The computation includes automatic sign adjustment for negative inputs and mathematically verifies the resulting linear combination to ensure correctness.

Does the Extended Euclidean Algorithm visualization require any specific environment?

The Extended Euclidean Algorithm visualization requires client-side JavaScript execution to render the division table and handle the interactive, user-driven computation flow. No additional dependencies or external libraries are needed.

How do I verify the identity ax + by = gcd(a, b) after computing Bezout coefficients?

To verify the identity ax + by = gcd(a, b) after computing Bezout coefficients, the skill automatically performs mathematical verification of the resulting linear combination. This interactive verification confirms the computed GCD and coefficients match.