AngouriMath

Navigation

← Back to list of members

Congruent​(AngouriMath.​Entity,​AngouriMath.​Entity,​AngouriMath.​Entity)

 Method (no overloads)

Summary

The statement that two integers are congruent modulo a third: a = b (mod n),
which is n divides a - b. A relation, not the remainder operator a mod n.
https://github.com/asc-community/AngouriMath/issues/1409

Example

Console.WriteLine(MathS.NumberTheory.Congruent(15625, 1, 7).Evaled);
Console.WriteLine("-1 = 9 (mod 10)".ToEntity().Evaled);
Console.WriteLine("(n - a)^2 = a^2 (mod n)".ToEntity().Simplify());

Prints
True
True
True

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online