GMP库中的程序
在 Sage 中,有一个函数“append”。一个例子如下。
A=[]
for i in range(100):
if(i%2==0):
A.append(i)
在 libgmp 中是否有这样的函数可以存储 mpz_t 值?
In Sage, there is a function 'append'. One example is as follows.
A=[]
for i in range(100):
if(i%2==0):
A.append(i)
In libgmp is there any such kind of function where I can store mpz_t values?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
否。GMP 仅提供 mpz_t 创建、删除和数学运算的原语。对数据结构的支持由使用 libgmp 的语言提供。 Sage 使用 Python 作为将其他库粘合在一起的语言,您的示例只是 Python 代码的示例。
No. GMP just provides the primitives for mpz_t creation, deletion, and mathmatical operations. Support for data structures is provided by the language that is using libgmp. Sage uses Python as its language for gluing together other libraries and your example is just an example of Python code.