首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >julia 0.6中的素数分解

julia 0.6中的素数分解
EN

Stack Overflow用户
提问于 2017-02-26 18:05:59
回答 3查看 1.7K关注 0票数 1

正如Julia的文档(0.6之前)所述,素数分解可以通过使用因子(N)来完成。

它在Julia 0.6中不起作用。在新版本的Julia中是否有任何软件包可以输出任意给定数字的素数因子和它们的正则性,就像下面(文档中的)所示的(N)

factor(n) → Dict
Compute the prime factorization of an integer n. 
Returns a dictionary. The keys of the dictionary correspond to the factors, and hence are of the same type as n. 
The value associated with each key indicates the number of times the factor appears in the factorization.

julia> factor(100) # == 2*2*5*5
Dict{Int64,Int64} with 2 entries:
2 => 2
5 => 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42467136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档