Anonymous user
Talk:Range extraction: Difference between revisions
→prime number musing: added a new section.
(→TUSCRIPT example: So close ...) |
(→prime number musing: added a new section.) |
||
Line 59:
==TUSCRIPT example==
It would be good to both keep the current TUSCRIPT example - noting where it fails to follow the task description; as well as create a fully compliant version. It was pleasantly surprising to see that the language had a built-in routine that could so nearly produce the right answer! --[[User:Paddy3118|Paddy3118]] 21:31, 28 January 2011 (UTC)
==prime number musing==
[Under the category of using a hammer to swat a fly.]
One could use ''range extraction'' for composite numbers to show prime numbers (indicated by the ''gaps'').
For the first 100 composite numbers:
: 4 6 8-10 12 14-16 18 20-22 24-28 30 32-36 38-40 42 44-46 48-52 54-58 60 62-66 68-70 72 74-78 80-82 84-88 90-96 98-100
Of course, primes '''2''' and '''3''' would be a special case. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:33, 18 April 2013 (UTC)
|