Talk:Prime decomposition: Difference between revisions
Content added Content deleted
(→Notes: new section) |
m (→NZMATH: new section) |
||
Line 38: | Line 38: | ||
To me, both requirements should be dropped (bignums and the use of "growing arrays" should be other tasks) --[[User:ShinTakezou|ShinTakezou]] 14:09, 7 April 2009 (UTC) |
To me, both requirements should be dropped (bignums and the use of "growing arrays" should be other tasks) --[[User:ShinTakezou|ShinTakezou]] 14:09, 7 April 2009 (UTC) |
||
== NZMATH == |
|||
here's a Python 3 example using NZMATH modules--[[User:Billymac00|Billymac00]] 03:11, 3 January 2011 (UTC) |
|||
<lang python> |
|||
# snippet.py Python 3 to demo NZMATH ops ref: http://tnt.math.se.tmu.ac.jp/nzmath/ |
|||
import sys |
|||
sys.path.append(r'C:\Python31\Lib') |
|||
sys.path.append(r'C:\Python31\Lib\site-packages') |
|||
from nzmath import prime |
|||
from nzmath import arith1 |
|||
print("factors of 64 2 ways: ") |
|||
print(prime._factor(64)) # returns [ (2 , 6) ] |
|||
print("") |
|||
print(prime.properDivisors(64)) # returns [2, 4, 8, 16, 32] |
|||
</lang> |