Talk:Chowla numbers: Difference between revisions

m
→‎Large computations: corrected a typo. away --> a way
m (→‎Large computations: corrected a typo. away --> a way)
 
(10 intermediate revisions by 4 users not shown)
Line 24:
: Do we really need to agree on this kind of thing ? Optional seems more than good enough [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 12:24, 11 March 2019 (UTC)
:: +1 for that. See below. If the language supports locales for numbers then OK. Writing a subroutine putting commas every 3 digits in an Anglophobe interpretation of appropriate seems worse than pointless almost stupid.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 15:50, 11 March 2019 (UTC)
:::Agreed. Tasks should focus on one specific problem. If adding comma is a recurring theme, then make it a task and if you really feel it should appear everywhere, at least make it optional. Besides, not all countries use commas, in France at least the thousand separator is a space : much better to leave such details in a separate task. And while we are at it, adding non-breaking spaces everywhere in task descriptions should not be encouraged. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 07:18, 13 March 2019 (UTC)
:::: I agree that the excessive specification on the formatting of task output takes the focus away from how different languages best solve a task. It makes perfect sense to me to move those formatting specifications to their own separate task. --[[User:Tikkanz|Tikkanz]] ([[User talk:Tikkanz|talk]]) 20:16, 14 March 2019 (UTC)
 
==http://www.syllabus.ca/en/didyouknow-en/writing-numbers-in-french-and-english/==
Line 53 ⟶ 55:
 
:::: I have never read responses (or opinions) on the above books on whether or not that those epigraphs should/shouldn't be included in the respective books, or even a discussion on they being appropriate (or not), or even the merits of the quoted texts. &nbsp; We could discuss the merits of Gauss' opinion, but that wasn't the point of the epigraph. &nbsp; When one discusses the book ''Frankenstein'', John Milton's quote is <u>never</u> talked about &nbsp; (well, except for here). &nbsp; I never thought that adding an epigraph would ruffle so many feathers. &nbsp; I had thought that the collegiate reader's minds on Rosetta Code would appreciate a relevant quote. &nbsp; To move the epigraph to the discussion page would surely distract from the Rosetta Code task of chowla numbers. &nbsp; But perhaps a discussion on number theory and how '''chowla numbers''' relates to that would be refreshing. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 00:28, 13 March 2019 (UTC)
 
:::: Or another discussion could be how the '''chowla''' function could be used to find Mercenne primes. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 00:46, 13 March 2019 (UTC)
 
Epigraphs are appetizers to a story and put important themes of the story in a reader's mind. In the case of Frankenstein epigraph it is obvious to me how this is the case. What important theme are you claiming should put in my mind by this epigraph. Surely the task as presented is more Euclidean. RC has many tasks on number theory (few well thought out ones) are they all diminished by not Epigraphing Gauss.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 15:47, 13 March 2019 (UTC)
 
==Large computations==
Line 67 ⟶ 73:
::Unfortunately I later learned that the sympy library holding divisors is pure Python, but it is well regarded so I used it rather than creating my own.
::Hi Gerard, I mainly program in interpreted Python but '''don't''' want the present limits to be lowered.
::It is good to have some tasks that stress some languages, but I was thinking of finding <strike>away</strike> a way for most of the slower mplementations to naturally use the same lowered lmits. In the Python example I tried to do something like that and used shorter runs to prove my code, but just left the longer runs to the end and left them running. Luckily for me, they eventually finished, after sometime! --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 21:49, 12 March 2019 (UTC)
 
::: Does Python use a non-interpreted "language" for its BIFs? &nbsp; (In particular, &nbsp; '''divisors'''.) &nbsp; &nbsp; The reason I ask is that I wrote a home-grown &nbsp; '''divisors''' &nbsp; REXX function that instead of finding the divisors, and then adding them (say, with a &nbsp; '''sum''' &nbsp; function), I modified a version of the &nbsp; '''divisors''' &nbsp; code to instead of creating a list of proper divisors, I had the function just add the divisors on-the-fly (eliminating the stand-alone summation part). &nbsp; I then further modified the function to be aware if the target is odd or even, and adjusted the &nbsp; '''do''' &nbsp; loop accordingly (along with the &nbsp; '''do''' &nbsp; loop increment); &nbsp; that doubled the speed (or halved the computation time, &nbsp; pot-tay-toe, pot-tah-toe). &nbsp; Essentially, I coded a &nbsp; '''sigma_proper_divisors''' &nbsp; function with the subtraction of unity as being built-in by starting the summation with zero instead of unity). &nbsp; &nbsp; &nbsp; Do you happen to know if Python's &nbsp; '''divisors''' &nbsp; BIF does that? &nbsp; I would suspect that it does. &nbsp; In any case, this is why I included several formulas/algorithms to calculate the &nbsp; '''chowla''' &nbsp; function so that programmers could choose the fastest (most efficient) algorithm. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:00, 12 March 2019 (UTC)
 
 
 
::: I'm really impressed by the large perfect numbers computed with &nbsp; '''Visual Basic .NET''' &nbsp; using the Chowla function &nbsp; (2<sup>nd</sup> section, under &nbsp; '''more cowbell'''). &nbsp; That's going the extra mile, by gum. &nbsp; Going from roughly '''33 million''' to over '''8 billion''', &nbsp; and then to over '''137 billion''', &nbsp; and then to over '''2 quintillion'''. &nbsp; Was the computer smoking or losing its magic smoke? &nbsp; &nbsp; Kudos. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:05, 13 March 2019 (UTC)
 
::::No magic cigarette, VB.NET benefits from .NET's JIT. It's not your grandma's VB6. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 07:24, 13 March 2019 (UTC)
 
::::: Er, no. &nbsp; "Magic smoke" does not come from cigarettes. &nbsp; The term "magic smoke" is a running joke amongst electrical engineers, computer technicians and computer programmers. &nbsp; A electrical device operates until the magic smoke is released from it, at which point the component ceases to operate. Therefore, the magic smoke is a critical and essential part of the device's operation. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:12, 19 March 2019 (UTC)
 
== Mistakenly posted discussion on the task page ==
 
The comments below were in response to some inappropriate remarks made within the '''Perl 6''' header section, which have since been removed. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:50, 12 March 2019 (UTC)
 
(Updated) &nbsp; The inappropriate remarks made within the '''Perl 6''' header section, have been reinstated. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:26, 13 March 2019 (UTC)
 
:: "We" aren't using a thing poorly suited to finding prime numbers. &nbsp; This Rosetta Code task (as also the totient function task) is to show that it ''can'' find or determine prime numbers, and as a proof/validation that the computer programs work. &nbsp; No one is disputing that these tasks are not suited to find prime numbers. &nbsp; These kinds of silly statements don't belong on this page, the ''discussion'' page is more suited for that, but try to keep the tone civil instead of condescending and demeaning. &nbsp; Please try and keep this site professional. &nbsp; If you don't know why a task requirement was included, then ask (on the task discussion page or a user discussion page). &nbsp; It's this sort of sniping that some people are being critical of Rosetta Code. &nbsp; People don't respond to rudeness and pettiness. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 17:24, 12 March 2019 (UTC) &nbsp; &nbsp; (this task's author).
Line 82 ⟶ 98:
 
In removing the inappropriate Perl 6 comment, I note that it touched on two topics that already have sections here on the talk page. Maybe the Perl6 author might like to join those discussions? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 23:25, 12 March 2019 (UTC)
 
: Tank qew, Paddy. &nbsp; I certainly didn't want to start an edit war. &nbsp; The last one lasted pages and then some more pages. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:08, 13 March 2019 (UTC)
 
 
: Paddy, you may also want to remove a similar comment in the '''Perl 6''' header section for the Rosetta Code task &nbsp; Totient function'''. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:47, 12 March 2019 (UTC)