Talk:N-smooth numbers: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Disagreement among implementations: fixed the REXX problem.)
Line 8: Line 8:


: The output of REXX for the optional sub-task is indeed incorrect, as some of the values are not really p-smooth. One such example is 38123 = 67 * 569. -- [[User:Trizen|Trizen]] ([[User talk:Trizen|talk]]) 09:34, 29 August 2019 (UTC)
: The output of REXX for the optional sub-task is indeed incorrect, as some of the values are not really p-smooth. One such example is 38123 = 67 * 569. -- [[User:Trizen|Trizen]] ([[User talk:Trizen|talk]]) 09:34, 29 August 2019 (UTC)

:: I found the problem. &nbsp; Once the problem was found, it was so obvious. &nbsp; I don't want to go into the embarrassing details, &nbsp; but some of the simplest errors are so easy to overlook. &nbsp; What triggered the &nbsp; ''ah-ha!'' &nbsp; moment was the last line of the 1<sup>st</sup> batch of output, &nbsp; the 10<sup>th</sup> prime (and all others above that) &nbsp; were indexed incorrectly. &nbsp; But thanks for noticing the problem in the output(s). &nbsp; Also, I had also overlooked including the output for the 2<sup>nd</sup> task requirement, which was obviously missing. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 13:01, 29 August 2019 (UTC)

Revision as of 13:01, 29 August 2019

Disagreement among implementations

There seems to be some disagreement among the various implementations about what the 30000th value is for the optional sub-task. Perl 6, Factor and Julia are the same, REXX has different answers. I've checked the Perl 6 several times and can't see where it may be wrong. (That is not to say that it isn't necessarily, I just can't find a problem yet.) And I am not familiar enough with Julia, Factor or REXX to be able to verify any of those, though having 3 of them agree seems to lean toward those being correct.

To help find the disagreement, I've uploaded several text files containing the first 30,000: 503-smooth, 509-smooth and 521-smooth numbers as determined by Perl 6. Each file has 30,000 lines with one number on each line. The last line should be the 30,000th.

If another author could check against these files and let me know where we differ it would be appreciated. --Thundergnat (talk) 08:56, 29 August 2019 (UTC)

The output of REXX for the optional sub-task is indeed incorrect, as some of the values are not really p-smooth. One such example is 38123 = 67 * 569. -- Trizen (talk) 09:34, 29 August 2019 (UTC)
I found the problem.   Once the problem was found, it was so obvious.   I don't want to go into the embarrassing details,   but some of the simplest errors are so easy to overlook.   What triggered the   ah-ha!   moment was the last line of the 1st batch of output,   the 10th prime (and all others above that)   were indexed incorrectly.   But thanks for noticing the problem in the output(s).   Also, I had also overlooked including the output for the 2nd task requirement, which was obviously missing.     -- Gerard Schildberger (talk) 13:01, 29 August 2019 (UTC)