MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / operator /

Method operator /

Math/Thomas Algorithm.cpp:20–20  ·  view source on GitHub ↗

MOD must be a prime

Source from the content-addressed store, hash-verified

18 modint<MOD> pow(uint64_t k) const { modint<MOD> x = *this, y = 1; for (; k; k >>= 1) { if (k & 1) y *= x; x *= x; } return y; }
19 modint<MOD> inv() const { return pow(MOD - 2); } // MOD must be a prime
20 inline modint<MOD> operator / (modint<MOD> other) const { return *this * other.inv(); }
21 inline modint<MOD> operator /= (modint<MOD> other) { return *this *= other.inv(); }
22 inline bool operator == (modint<MOD> other) const { return value == other.value; }
23 inline bool operator != (modint<MOD> other) const { return value != other.value; }

Callers

nothing calls this directly

Calls 1

invMethod · 0.45

Tested by

no test coverage detected