Anonymous user
Talk:Babbage problem: Difference between revisions
→computer program comments: Reply
imported>PauliKL (→computer program comments: Reply) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 26:
It's a good thing that Charles Babbage, being English, understands ..., er, ... ''English'' --- otherwise all of our computer programming languages' comments would be for naught. Ay, what? Jolly good show! -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 09:56, 13 April 2016 (UTC)
:One requirement in the task is that the code should be well documented and commented. Still, many implementations do not have comments at all. [[User:PauliKL|PauliKL]] ([[User talk:PauliKL|talk]]) 10:37, 13 October 2023 (UTC)
==Pictures==
Line 129 ⟶ 131:
The task calls for an efficient solution. If n<sup>2</sup> ends in 6 then n must end in 4 or 6 which eliminates 80% of the values of n being tested by many (I don't want to say all in case a solution has done this but I couldn't see one) of the solutions being offered. This logic can be extended but I'll settle for the easy 80%.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 18:09, 21 December 2022 (UTC)
:The worst case is 25,264 iterations (sometimes -519), but of course yields the easiest to understand solution, slightly better half that (even only, sometimes -262), slightly better (ends in 4 or 6, as per F# and several others) is 5,057 iterations, slightly better (multiples of 8) 3,158 iterations, even better (prefix*1e6+269696) 638 iterations, and my own Phix/proper method (and I think Tcl.2 and Unix shell.2) builds candidate lists and gets there
:PS should I mark your F# entry as incorrect, or are you going to fix it? 😀 --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 11:03, 22 December 2022 (UTC)
|