Amicable pairs: Difference between revisions

Content deleted Content added
Ssmitch45 (talk | contribs)
Ssmitch45 (talk | contribs)
Line 4,653:
 
==={{header|PL/I-80}}===
Rather than populating an array with the sumssum of the proper divisors preparatory toand athen searchsearching, the approach here performs an direct test, saving memory, and at no observablesignificant penalty in execution speed, even though about 25% more calls are made to sumf() than would be required simply to initialize thean array.
<lang PL/I>
amicable: procedure options (main);
Line 4,680:
 
 
/* return sum of the proper divisors of n */
sumf:
sumf: procedure(n) returns (fixed bin);
dcl (n, sum, f1, f2) fixed bin;