Talk:Prime decomposition: Difference between revisions

(→‎Notes: remove bignum req, please)
 
(4 intermediate revisions by 4 users not shown)
Line 4:
It prints out the factors seperated by * to stdout, In the context of unix, where everything is a text stream this counts as a collection.
Why do you think it's unconventional, If you haven't used libgmp it may look strange.
 
==C==
This method seems to be incorrect. E.g. it does not find the decomposition for 2^41 - 1 == 13367 * 164511353. Can someone confirm this?
--[[User:Renfield|Renfield]] ([[User talk:Renfield|talk]]) 12:18, 18 June 2019 (UTC)
 
==Java==
Line 42 ⟶ 46:
 
I also think that bignum/growing array requirements should be dropped. At the very least, the title of the page should indicate that big numbers are part of the challenge. --[[User:Showell|Showell]] 07:33, 5 January 2012 (UTC)
:Agreed. The task is asking far too much. Integer factorization is one of those basic programs one learns early, in any language. But if bignums are required, it's entirely another matter: first one needs a library (relatively hard), then one needs a good factorization algorithm (very hard). [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 23:28, 17 December 2017 (UTC)
 
== NZMATH ==
Line 83 ⟶ 88:
: I missed that bit_pos[] has only 8 nonzero elements. After this loop fills b[0] to b[7], it continues to assign b[8] = 0, because the assignment is before the <code>continue</code> statement. Therefore, program must declare array b[9] to hold elements b[0] to b[8]. --[[User:Kernigh|Kernigh]] 22:29, 7 September 2011 (UTC)
:: Ok. Don't edit it yet though, I'll modify that part of the logic soon. --[[User:Ledrug|Ledrug]] 22:32, 7 September 2011 (UTC)
 
== Factor missing from 15 November 2001 to 23 March 2012 ==
 
An anonymous user [http://rosettacode.org/mw/index.php?title=Prime_decomposition&diff=next&oldid=125923 accidentally deleted the Factor example] at '''15 November 2001'''. Rosetta Code never caught this mistake and never restored the deleted code. Nickolas [http://rosettacode.org/mw/index.php?title=Prime_decomposition&diff=134165&oldid=132999 contributed a new Factor example] at '''23 March 2012'''. --[[User:Kernigh|Kernigh]] 15:03, 23 March 2012 (UTC)
 
: '''2001'''? &nbsp; I thought ''Rosetta Code'' was inaugurated in '''2007'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 13:37, 16 October 2013 (UTC)
 
== Javascript ==
 
Javascript implementation without libraries fails with 100 as an argument. It decomposes to 2,2,25
Anonymous user