Talk:Attractive numbers

From Rosetta Code

optional requirements?

What about some optional requirements, such as:

  •   showing the   number   (count)   of attractive numbers up to and including:
  •        10,000
  •      100,000
  •   1,000,000


The last optional requirement (extra credit) would/could show the robustness of the code.     -- Gerard Schildberger (talk) 08:52, 11 April 2019 (UTC)

I would suggest 10^5 but not 10^6, which would heat a lot of cores, reduce the number of participating languages, and perhaps yield rather limited additional insight or opportunities for learning ?
You did read where I said optional, didn't you?   I don't think people will skip a task based on the optional or stretch goal   (or extra/extended credit, et al).     -- Gerard Schildberger (talk) 14:54, 21 October 2019 (UTC)
A shame to be fruitlessly profligate with fuel while the glaciers melt :-) Hout (talk) 10:52, 11 April 2019 (UTC)
:-)
--Paddy3118 (talk) 12:20, 11 April 2019 (UTC)
I don't think anybody (including the environment) will be impacted for computing (largish) attractive numbers.   I never shut my computer off, and there isn't much power increase of running (at full throttle) one engine.   For me, this is "free" heat, as anything the PC generates for heat, my furnace doesn't have to run a tenth of a second.   Six of one, a half-dozen of the other.   I only pay around 8¢/KWH (kilowatt-hour), but some people pay around the 12¢/KWH range   (or more, my friend in Boston used to pay around 14.2¢/KWH about seven years ago).   Converting that figure from kilowatt-hours to kilowatt-seconds borders on the ludicrous, but still fun to do back-of-the-envelope calculations.   From my ammeter, my (slow) PC uses about 40 watts, my (newer and faster) PC uses less.   (This power draw is confirmed by a meter on my UPS which the computer is plugged into, other auxiliary computer components have their own UPS).   Counting the number of attractive numbers up to one million   (assuming that I'll pay the extra amount of power used   (even though the computer would be running anyway),   would've cost me quite a bit less than   (1¢÷90),   by my calculations.   Now,   $0.000111   is barely noticeably, but ya know, if a crowd of a couple of dozen people execute it,   well ...   that's still piddly monies.   If anybody wants a refund, send me a   SASE   and I'll write you a check.   Now, to me, this is funny.   The cores!   The hot cores!   Just think of all the electrons killed just sending this message.   (And people say the electrical engineers don't have any sense of humor).   😊     -- Gerard Schildberger (talk) 14:54, 21 October 2019 (UTC)
I just saw a post (another Rosetta Code task) that (userid Horst.h) stated:   ---   Total power dissipation 115 watts running on all cores on all core (sic),   ...   6-Core PC AMD Ryzen 5 1600 (3.4 Ghz on all cores Linux64 with SMT= on).     So with six fast engines, 115 watts 'tain't that much, three times what I use on my (slower) one engine, but what the hey!!     -- Gerard Schildberger (talk) 17:53, 21 October 2019 (UTC)
I see that the   Pascal   entry has computed (counted) the number of attractive numbers up to one billion   (and took only 43 seconds).   Now, that's going the extra mile, for sure.   Kudos to (userid) Horst.h !     -- Gerard Schildberger (talk) 13:56, 22 October 2019 (UTC)
(an update):     I see that the   Pascal   entry has computed (counted) the number of attractive numbers up to ten billion.     -- Gerard Schildberger (talk) 08:40, 23 October 2019 (UTC)