Primality by trial division: Difference between revisions

m
→‎compact version: made version 1 similar to version 2 (SAY instructions). -- ~~~~
m (→‎{{header|REXX}}: replaced ARG with PARSE ARG in both examples (faster execution). -- ~~~~)
m (→‎compact version: made version 1 similar to version 2 (SAY instructions). -- ~~~~)
Line 1,294:
end
 
say; say "there're" p "primes up to" n '(inclusive).'
say
say "there're" p "primes up to" n '(inclusive).'
exit /*stick a fork in it, we're done.*/
/*──────────────────────────────────ISPRIME subroutine──────────────────*/
Line 1,337 ⟶ 1,336:
there're 1229 primes up to 10000 (inclusive).
</pre>
 
===unrolled version===
This version just uses an ''unrolled'' version (of the first version) of the multiple-clause '''IF''' statements, making it slightly faster.