Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Sympy 是否支持模块化组?
我正在寻找类似于pari/gp'Mod功能的东西。
pari/gp
Mod
有点令人困惑的是,整数环模 n 被实现为GF(n)(表示有限域的符号,这些通常不是)。因此,5 mod 12 将表示为
GF(n)
>>> from sympy import GF >>> x = GF(12)(5) >>> print(x) 5 mod 12 >>> print(x*4) 8 mod 12 >>> print(-x) 7 mod 12 >>> print(x+10) 3 mod 12 >>> print(x**2) 1 mod 12