Jump to content

Aliquot sequence classifications: Difference between revisions

m
→‎{{header|REXX}}: added wording to the REXX section header, changed a program comment.
m (→‎{{header|REXX}}: optimized the CLASSIDY subroutine (for speed), used a template for OUTPUT.)
m (→‎{{header|REXX}}: added wording to the REXX section header, changed a program comment.)
Line 2,037:
 
=={{header|REXX}}==
Programming notes:
 
This REXX version uses memoization.
 
Two versions of   ''classifications''   of   ''non-terminating''   are used:
::*   (lowercase)   '''non-terminating'''       ───   due to more than sixteen cyclic numbers
::* &nbsp; (uppercase) &nbsp; '''NON-terminating''' &nbsp; &nbsp; ─── &nbsp; due to a cyclic number that is larger than <big>2<sup>47</sup></big>
 
Both of the above limitations are imposed by this Rosetta Code task's restriction requirements: &nbsp; ''For the purposes of this task, ···''.
<lang rexx>/*REXX program classifies various positive integers for types of aliquot sequences. */
parse arg low high L /*obtain optional arguments from the CL*/
Line 2,043 ⟶ 2,051:
if L='' then L=11 12 28 496 220 1184 12496 1264460 790 909 562 1064 1488 15355717786080
numeric digits 20 /*be able to handle the number: BIG */
big=2**47; NTlimit=16+1 /*limitlimits for a non─terminating sequence.*/
numeric digits max(9, 1 + length(big) ) /*be able to handle big numbers for // */
#.=.; #.0=0; #.1=0 /*#. are the proper divisor sums. */
Cookies help us deliver our services. By using our services, you agree to our use of cookies.