[SciPy-user] prime factorization...
HEMMI, Shigeru
textdirected at gmail.com
Fri Jun 19 23:40:47 EDT 2009
2009/6/18 fred <fredmfp at gmail.com>
> Hi all,
>
> Is there any function in scipy that gives the prime factorization?
>
> ie 50 -> [5, 5, 2]?
>
> TIA
>
> Cheers,
>
> --
> Fred
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
Let me tell you there is another solution: NZMATH
http://tnt.math.metro-u.ac.jp/nzmath/index.html
which is written in Python.
>>> import nzmath.factor.methods as methods
>>> dir(methods)
['DefaultMethod', 'EllipticCurveMethod', 'MPQSMethod', 'PMinusOneMethod',
'RhoMethod', 'TrialDivision', '__builtins__', '__doc__', '__file__',
'__name__', 'arith1', 'bigrange', 'ecm', 'ecmfind', 'factor', 'find',
'mpqs', 'mpqsfind', 'pmom', 'prime', 'rhomethod', 'trialDivision', 'util']
>>> methods.factor(50)
[(2, 1), (5, 2)]
>>> methods.factor(18440000000000000000)
[(2, 18), (5, 16), (461L, 1)]
Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090620/d51bf750/attachment.html>
More information about the SciPy-User
mailing list