创建GF(5^2)多项式环时出现错误

2024-10-05 10:19:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我想处理GF(p^k)上的多项式环,其中p是素数

我试过:

p = 3
q = 9
Fq.<alpha> = FiniteField(q)
Pol.<x> = PolynomialRing(Fq)
Pol

这就产生了一个错误:

TypeError: Cannot convert non-integral float to integer

我正在使用SageMath 8.3。你知道为什么以及如何解决这个问题吗


Tags: toalphaconvert错误float素数gfnon
1条回答
网友
1楼 · 发布于 2024-10-05 10:19:10

无法重现此问题。在CoCalc上运行Sage 8.3:

$ sage-8.3
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.3, Release Date: 2018-08-03                     │
│ Create a "Sage Worksheet" file for the notebook interface.         │
│ Enhanced for CoCalc.                                               │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: p = 3
sage: q = 9
sage: Fq.<alpha> = FiniteField(q)
sage: Pol.<x> = PolynomialRing(Fq)
sage: Pol
Univariate Polynomial Ring in x over Finite Field in alpha of size 3^2
  • 你能在新的Sage课程中重现这个问题吗
  • 你的操作系统是什么
  • 你是如何安装Sage的(通过包管理器?作为二进制文件 从SageMath网站下载?源代码构建?等等
  • 这是否发生在Sage REPL(终端)中? 在SageNB工作表中?在Jupyter笔记本里?其他的

相关问题 更多 >

    热门问题