julia0.6中的素因子分解

julia0.6中的素因子分解,julia,factorization,Julia,Factorization,正如Julia在0.6之前的文档中所述,素因子分解可以通过使用factorn来完成 它在Julia 0.6中不起作用。Julia的新版本中是否有输出素数因子及其对任意给定数n的算术的包,正如factorn在下面的文档中所示 factor(n) → Dict Compute the prime factorization of an integer n. Returns a dictionary. The keys of the dictionary correspond to the fact

正如Julia在0.6之前的文档中所述,素因子分解可以通过使用factorn来完成

它在Julia 0.6中不起作用。Julia的新版本中是否有输出素数因子及其对任意给定数n的算术的包,正如factorn在下面的文档中所示

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

这被移到包中

Julia v0.5中提供了弃用警告,该功能在v0.6中完全删除

julia> VERSION
v"0.5.0"

julia> factor(100)
ERROR: factor(100,) has been moved to the package Primes.jl.
Run Pkg.add("Primes") to install Primes on Julia v0.5-
 in factor(::Int64, ::Vararg{Int64,N}) at ./deprecated.jl:210

这被移到包中

Julia v0.5中提供了弃用警告,该功能在v0.6中完全删除

julia> VERSION
v"0.5.0"

julia> factor(100)
ERROR: factor(100,) has been moved to the package Primes.jl.
Run Pkg.add("Primes") to install Primes on Julia v0.5-
 in factor(::Int64, ::Vararg{Int64,N}) at ./deprecated.jl:210
运行:Pkg.addPrimes Pkg.update以更新所有

运行:使用primes编译包

factor100运行:Pkg.addPrimes Pkg.update以更新所有

运行:使用primes编译包

因子100

运行导入包;Pkg.addPrimes安装primes软件包。 运行导入包;Pkg.addPrimes安装primes软件包。
是否没有相应的弃用警告?它已在0.5中移动,并且存在弃用警告。该警告在0.6版本中消失了,因为它已被弃用于某个版本。跳过版本是危险的:是否没有相应的弃用警告?它是在0.5中移动的,并且存在弃用警告。该警告在0.6版本中消失了,因为它已被弃用于某个版本。跳过发布是危险的: