Talk:Prime decomposition: Difference between revisions

m
Add ==headers== to first sections.
m (Add ==headers== to first sections.)
Line 1:
==C==
Could someone explain the C example a bit more (either in text around it or in comments)? It's using some things I think may be a bit unconventional. Also, does it actually return some sort of collection which contains the factors? The task says it should. --[[User:Mwn3d|Mwn3d]] 09:17, 5 February 2008 (MST)
 
Line 4 ⟶ 5:
Why do you think it's unconventional, If you haven't used libgmp it may look strange.
 
==Java==
Also the java example doesn't work for all integers > 1, maybe it could be fixed using the java bignum lib.
:I added a BigDecimal example, though I don't think anyone will ever need to go beyond Double.MAX_VALUE. If they want to, they shouldn't be using Java. Also, sign your talk page posts please. See [[Help:Formatting]] for tips. --[[User:Mwn3d|Mwn3d]] 11:08, 5 February 2008 (MST)
 
==J==
 
I note the J example simply calls a built-in - is that allowed? The task is kinda vague: "write a function that..." which could well include access to some language builtin. Or is the intent to show how one would solve the actual problem in that language? [[User:Sgeier|Sgeier]] 11:32, 6 February 2008 (MST)
:The vagueness is fine. Do it as simply as you see fit. If your language has prime decomposition built-in then that just makes it easier. --[[User:Mwn3d|Mwn3d]] 11:44, 6 February 2008 (MST)
Anonymous user