Returns the prime factors of a long (64-bit) integer.
Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16073.0)
public static long Factorize(
Public Shared Function Factorize (
n As Long
) As Long()
static array<long long>^ Factorize(
long long n
static member Factorize :
n : int64 -> int64
- Type: SystemInt64
A 64-bit integer greater than zero.
A 64-bit integer array containing the prime factors
in ascending order.
This method uses a simple trial divide
algorithm to look for small prime factors. It then
switches to Pollard's Rho algorithm to find any large
prime factors of n with the known
factors divided out. If this number is prime, the
algorithm may take a long term to finish.
This method breaks down when the Rho algorithm
is invoked for values larger than 248.
No further decomposition is attempted. Instead, this
number is returned as the last factor.
Supported in: 6.0, 5.x, 4.x