Untouchable numbers: Difference between revisions

Content added Content deleted
m (promote to full task.)
m (→‎{{header|REXX}}: changed wording in the REXX section header.)
Line 513: Line 513:
=={{header|REXX}}==
=={{header|REXX}}==
Some optimization was done to the code to produce prime numbers,   since a simple test could be made to exclude
Some optimization was done to the code to produce prime numbers,   since a simple test could be made to exclude
<br>the calculation of touchability for primes as the aliquot sum of a prime is unity.
<br>the calculation of touchability for primes as the aliquot sum of a prime is always unity.
<br>This saved around &nbsp; '''15%''' &nbsp; of the running time.
<br>This saved around &nbsp; '''15%''' &nbsp; of the running time.


A fair amount of code was put into the generation of primes, &nbsp; but the computation of the aliquot sum was the area
A fair amount of code was put into the generation of primes, &nbsp; but the computation of the aliquot sum is the area
<br>that consumed the most CPU time.
<br>that consumes the most CPU time.


This version doesn't appear to calculate the correct number of untouchable numbers for one million.
This version doesn't appear to calculate the correct number of untouchable numbers for one million.