a # 1 61 R ' z # can a;s;l ' a # a,[1] '"can - edit multiprecision integers into canonical form. ' a # a,[1] '"from ''the apl handbook of techniques'' copyright 1978, ibm. ' a # a,[1] '"-input a is edited into the canonical multiprecision ' a # a,[1] '" integer format as described under function add. ' a # a,[1] '"-this function is used by every other function in the ' a # a,[1] '" multiprecision integer and floating point arithmetic ' a # a,[1] '" packages, except rounds. ' a # a,[1] '"-uses: rounds. ' a # a,[1] ' z#1 rounds a ' a # a,[1] '"propagate carries leftward ' a # a,[1] 'l1:z#(s,0)+0,z_10000000Xs#(Xz)XD|z%10000000 ' a # a,[1] ' $(V/0^=s)/l1 ' a # a,[1] '"drop leading zeroes (but prevent 0$I0) ' a # a,[1] 'l2:$(1=Rz#(((0^=-1Uz)I1)_Lio)Uz)/l3 ' a # a,[1] '"make all terms (except the exponent) the same sign ' a # a,[1] ' $(~V/s#(_l#1Ys)=s#Xz)/l3 ' a # a,[1] ' $l2,Rz#z+(lX10000000Xs)+(1U_lXs),0 ' a # a,[1] 'l3:z#0,z ' Lfx a