Anonymous user
Primality by trial division: Difference between revisions
m
→compact version: added verbiage to the REXX section header.
(Added Smalltalk) |
m (→compact version: added verbiage to the REXX section header.) |
||
Line 2,498:
Also, it was determined that computing the (integer) square root of the number to be tested in the '''isPrime'''
<br>function slowed up the function (for all three REXX versions)
<br>be faster.
<lang rexx>/*REXX program tests for primality by using (kinda smartish) trial division. */
parse arg n .; if n=='' then n=10000 /*let the user choose the upper limit. */
|