본문으로 건너뛰기

계산기2(r361판 Blame)

r361
r297
1[[분류:냥]][[분류:계산용 틀]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:구 계산기2)][Include(틀:상세 내용, 설명대상=떼어낸 계산기, 문서명=틀\:계산기/구버전)]{{{#!wiki style="display: none;"
r361
2##본 틀을 편집기로 보고 있다면 계산 과정 사이에 첨부된 설명을 읽을 수 있습니다.
r360
3##디버그용 if 문법 ("문자열" 값으로 정의해야 합니다. 빈 문자열을 준다 하더라도 주어진 모든 변수에 문자열을 달아놓아야 해당 디버그용 if 문법이 동작됩니다.)
r330
4{{{#!if a= ,b= ,f=, md=
r182
5}}}
r209
6##== 변수 설명 ==
r50
7'''as''' : "a" value to string; '''bs''' : "b" value to string;
r51
8'''al''' : "a" string length (integer); '''bl''' : "b" string length (integer)
9'''ad''' : "a" decimal point (integer); '''bd''' : "b" decimal point (integer);
10'''au''' : --gold-- "a" upper value (string→integer); '''bu''' : "b" upper value (string→integer);
11'''ab''' : "a" below value (string→integer); '''bb''' : "b" below value (string→integer);
r202
12'''ap''' : "a" # of places of decimal (for addition or subtraction);
r207
13'''ac''' : a '''c'''onstant of "a" for division (integer);
r202
14'''bp''' : "b" # of places of decimal (for addition or subtraction);
r207
15'''bc''' : a '''c'''onstant of "b" for division (integer);
r50
160.303과 0.0303은 다른 수이므로 자리수가 다름을 표시할 용도
r73
17'''ru''' : "result" upper value (integer→string); '''rb''' : "result" below value (integer→string);
18'''rp''' : "result" # of places of decimal (integer);
r117
19'''rs''' : "result" suprerior value (integer→string); '''ri''' : "result" inferior value (integer→string);
r209
20'''i''' : index;
21'''tu''' : temporary value 1 (integer); '''tv''' : temporary value 2 (integer);
r235
22'''tw''' : temporary value 3 (integer); '''tx''' : temporary value 4 (integer→string);
23'''ty''' : temporary value 5 (integer); '''tz''' : temporary value 6 (integer);
r228
24'''pd''' : padding with zeros. (string)
r208
25'''ps''' : pass (logical); '''ts''' : --not about gender-- test (logical) ; '''br''' : break (logical);
r209
26'''ea''' : error code about "a" (integer); '''eb''' : error code about "b" (integer);
27'''wa''' : warning code about "a" (integer); '''wb''' : warning code about "b" (integer);
28'''ma''' : message about "a" (string); '''mb''' : message about "b" (string);
29'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r158
30'''ns''' : negative sign for multiplication and division (string);
r209
31
32##== 초기화 ==
33값을 미리 정의하여 초기화합니다. 중간에 --장난으로-- 계산에 사용되는 변수에 값을 부여한 채로 include 하더라도 이를 무시합니다.
r308
34{{{#!if this.as=a.toString(), this.bs=b.toString(), this.rs=0+0, this.ru=0+0, this.rb=0+0, this.ri=0+0, this.rp=0+0, this.i=0+0, this.tu=0, this.tv=1+0, this.tw=0, this.tx=0, this.ty=0, this.ea=0+0, this.eb=0+0, this.wa=0+0, this.wb=0+0, this.ps=false, this.ts=false, this.br=false, this.ns="", this.ma="", this.mb="", this.tm="", this.tn="", this.ms="", this.pd="000000000000000000"
r135
35}}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".")
r48
36}}}{{{#!if ad!=-1
r126
37소수점이 발견되는 자리 번호가 ad이므로 ad+1번에 해당되는 자리부터 끝까지 표기합니다.
r51
38{{{#!if this.au=as.substr(0,ad), this.ab=as.substr(ad+1, al-ad-1), this.ap=ab.length
r59
39}}}{{{#!if (au=="")||(au=="-")||(au=="+")
r125
40.12345 식으로 또는 -.12345 식으로 기입할 경우 upper 값을 0으로 부여합니다.
r57
41{{{#!if au="0"
r51
42}}}}}}}}}{{{#!if ad==-1
r126
43소수점이 존재하지 않을 경우 au 문자열 길이값을 ad로 정의합니다. au의 마지막 문자열 index는 ad-1이 됩니다.
r125
44{{{#!if this.au=as, ab="", ap=0+0, ad=au.length
r48
45}}}}}}{{{#!if bd!=-1
r92
46{{{#!if this.bu=bs.substr(0,bd), this.bb=bs.substr(bd+1, bl-bd-1), this.bp=bb.length
r59
47}}}{{{#!if (bu=="")||(bu=="-")||(bu=="+")
r57
48{{{#!if bu="0"
r48
49}}}}}}}}}{{{#!if bd==-1
r125
50{{{#!if this.bu=bs, bb="", bp=0+0, bd=bu.length
r46
51}}}}}}
r54
52
r207
53##== 유효성 검사 ==
r212
54the seed에서 지원되는 long(integer)가 unsigned였으면 1844경까지 가서 충분히 19자리로 놀 수 있었는데, signed long이므로 922경까지 가능한 공간에서 18자리로 잘라내기를 합니다. (소수점 위 최대 18자리, 소수점 아래 최대 18자리)
r55
55
r207
56(반점(,)을 자동적으로 생략하고 들어가는 것은 나중에 생각하겠습니다.)
r212
57
r218
58{{{#!if (as!=null)&&(bs!=null)
59a와 b 모두 입력되었을 때, br와 ts 변수를 이용하여 순차적으로 검사를 진행합니다. 도중 문제가 있으면 (br를 true로 반환하고) 오류 코드를 내도록 만듭니다. a를 먼저 보며, 소수점 윗부분을 먼저 본 다음 소수점 아랫부분을 봅니다.
r211
60변수 tm와 tn을 가져와 유효성 검사를 실행합니다.
61먼저 소수점을 2개 이상 입력했음이 탐지된다면 오류코드 5번(이중 소수점 표기)을 반환합니다.
62소수점을 입력하면 indexOf와 lastIndexOf는 서로 다른 값을 가리키게 됩니다. 소수점을 입력하지 않았을 경우 indexOf와 lastIndexOf는 -1로 서로 같은 값을 가리키게 됩니다.
r355
63{{{#!if ts=(as.indexOf(".")==as.lastIndexOf(".")), br=ts?br:true, ea=ts?0:5
64}}}
r209
65
r211
66문제가 없으면 au를 tm으로 복제하고 검사를 계속 합니다.
r355
67앞자리가 마이너스(-)일 경우 이를 잘라냅니다. 이 때 소수점 윗자릿수가 넘치면 오류코드 1번(오버플로)를 반환합니다.
r211
68{{{#!if ts&&!br
r356
69{{{#!if tm=(au[0]==45)?au.substr(1):au, ts=(tm.length<=18), br=ts?br:true, ea=ts?0:1
r215
70}}}}}}
r209
71
r244
72의도적으로 00을 적어놓았을 수 있으므로 tm 앞에 숫자 1을 더 붙인 다음, 이를 값으로 바꾼 다음 다시 텍스트 값으로 바꾼 문자열을 tn으로 정의합니다. 중간에 숫자가 아닌 문구가 들어갔다면 숫자가 아닌 문구가 들어간 부분부터 값이 잘려 나오게 됩니다.
r211
73숫자가 아닌 문구를 섞어넣었음이 탐지될 경우 오류코드 6번(소수점 윗자리 오류)을 반환합니다. (반점(,)도 걸릴 수 있습니다.)
r208
74{{{#!if ts&&!br
r355
75{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn), br=ts?br:true, ea=ts?0:6
r208
76}}}}}}
r209
77
r211
78소수점 아래 부분을 검사합니다. 앞에서 소수점 개수를 검사했으므로 소수점 아래 부분에 점(.)이 더 이상 나올 수 없습니다.
79소수점 아래 입력한 자릿수가 19자리를 넘어가면 오류 대신 경고코드 1번(소수점 아래 자릿수 너무 많음)을 반환하고 소수점 아래 자릿수를 최대 18자리로 잘라냅니다. (이하 이상한 문구를 섞어도 이를 계산에 넣지 않게 됩니다.)
r208
80{{{#!if ts&&!br
r211
81{{{#!if ab.length>=19
82{{{#!if wa=1, ab=ab.substr(0,18), ap=18
r199
83}}}}}}
r211
84
r212
85앞에서 소수점 아래 자릿수를 18자 이하로 줄였습니다. 문자열에서 자릿수에 해당하는 index가 비어있다면 해당 문자열의 주소값은 null이 나옵니다. (예:"테스트"[3]==null) 숫자는 문자열 각 자릿수 문자열의 유니코드 값이 null이 아닌 이상 48 이상 57 이하이며, 이를 이용하여 소수점 아래 18자리에 대해 유효성 검사를 합니다.
86{{{#!if ts=(((ab[0]==null)||((ab[0]>=48)&&(ab[0]<=57)))&&((ab[1]==null)||((ab[1]>=48)&&(ab[1]<=57)))&&((ab[2]==null)||((ab[2]>=48)&&(ab[2]<=57)))&&((ab[3]==null)||((ab[3]>=48)&&(ab[3]<=57)))&&((ab[4]==null)||((ab[4]>=48)&&(ab[4]<=57)))&&((ab[5]==null)||((ab[5]>=48)&&(ab[5]<=57)))&&((ab[6]==null)||((ab[6]>=48)&&(ab[6]<=57)))&&((ab[7]==null)||((ab[7]>=48)&&(ab[7]<=57)))&&((ab[8]==null)||((ab[8]>=48)&&(ab[8]<=57)))&&((ab[9]==null)||((ab[9]>=48)&&(ab[9]<=57)))&&((ab[10]==null)||((ab[10]>=48)&&(ab[10]<=57)))&&((ab[11]==null)||((ab[11]>=48)&&(ab[11]<=57)))&&((ab[12]==null)||((ab[12]>=48)&&(ab[12]<=57)))&&((ab[13]==null)||((ab[13]>=48)&&(ab[13]<=57)))&&((ab[14]==null)||((ab[14]>=48)&&(ab[14]<=57)))&&((ab[15]==null)||((ab[15]>=48)&&(ab[15]<=57)))&&((ab[16]==null)||((ab[16]>=48)&&(ab[16]<=57)))&&((ab[17]==null)||((ab[17]>=48)&&(ab[17]<=57))))
r356
87}}}
r211
88소수점 아래 자리에 입력한 부분이 문제가 있으면 오류코드 7번(소수점 아랫자리 오류)를 반환합니다.
r356
89{{{#!if br=ts?br:true, ea=ts?0:7
r209
90}}}}}}
91
r212
92이와 같은 방법으로 b도 bu를 tm으로 복제하는 과정을 포함하여 유효성 검사를 실행합니다. 오류코드는 동일합니다.
r213
93a와 b를 각각 진단해야 하므로 br를 false로 초기화합니다.
r356
94{{{#!if br=false, ts=(bs.indexOf(".")==bs.lastIndexOf(".")), br=ts?br:true, eb=ts?0:5
95}}}
r212
96{{{#!if ts&&!br
r356
97{{{#!if tm=(bu[0]==45)?bu.substr(1):bu, ts=(tm.length<=18), br=ts?br:true, eb=ts?0:1
r212
98}}}}}}
99{{{#!if ts&&!br
r356
100{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn), br=ts?br:true, eb=ts?0:6
r212
101}}}}}}
102{{{#!if ts&&!br
103{{{#!if bb.length>=19
104{{{#!if wb=1, bb=bb.substr(0,18), bp=18
r356
105}}}}}}{{{#!if ts=(((bb[0]==null)||((bb[0]>=48)&&(bb[0]<=57)))&&((bb[1]==null)||((bb[1]>=48)&&(bb[1]<=57)))&&((bb[2]==null)||((bb[2]>=48)&&(bb[2]<=57)))&&((bb[3]==null)||((bb[3]>=48)&&(bb[3]<=57)))&&((bb[4]==null)||((bb[4]>=48)&&(bb[4]<=57)))&&((bb[5]==null)||((bb[5]>=48)&&(bb[5]<=57)))&&((bb[6]==null)||((bb[6]>=48)&&(bb[6]<=57)))&&((bb[7]==null)||((bb[7]>=48)&&(bb[7]<=57)))&&((bb[8]==null)||((bb[8]>=48)&&(bb[8]<=57)))&&((bb[9]==null)||((bb[9]>=48)&&(bb[9]<=57)))&&((bb[10]==null)||((bb[10]>=48)&&(bb[10]<=57)))&&((bb[11]==null)||((bb[11]>=48)&&(bb[11]<=57)))&&((bb[12]==null)||((bb[12]>=48)&&(bb[12]<=57)))&&((bb[13]==null)||((bb[13]>=48)&&(bb[13]<=57)))&&((bb[14]==null)||((bb[14]>=48)&&(bb[14]<=57)))&&((bb[15]==null)||((bb[15]>=48)&&(bb[15]<=57)))&&((bb[16]==null)||((bb[16]>=48)&&(bb[16]<=57)))&&((bb[17]==null)||((bb[17]>=48)&&(bb[17]<=57)))), br=ts?br:true, eb=ts?0:7
r218
106}}}}}}}}}
r211
107
r209
108##== 2차 초기화 ==
r355
109유효성 검사가 종료되었으면 ts와 br, ps를 false로 초기화합니다 유효성 검사에 쓰인 tm과 tn 값을 빈 문자열 값으로 초기화합니다.
110{{{#!if tm="", tn="", ts=false, br=false, ps=false
r286
111}}}
112
r209
113입력한 소수점 아래에 입력한 값을 정리합니다. 이에 따라 ap, bp값도 다시 조정됩니다.
r357
114○○○○○○○○○□□□□○○□□○ 과 같이 9칸, 4칸, 2칸, 2칸, 1칸씩 그 정도를 보정하게 됩니다.
r223
115{{{#!if (ap>9)&&(ab.substr(ap-9,9)=="000000000")
r221
116{{{#!if ab=ab.substr(0,ap-9), ap=ap-9
r209
117}}}}}}
r223
118{{{#!if (ap>4)&&(ab.substr(ap-4,4)=="0000")
r209
119{{{#!if ab=ab.substr(0,ap-4), ap=ap-4
120}}}}}}
r223
121{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
122{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
123}}}}}}
r223
124{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
125{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
126}}}}}}
r223
127{{{#!if (ap>1)&&(ab.substr(ap-1,1)=="0")
r209
128{{{#!if ab=ab.substr(0,ap-1), ap=ap-1
129}}}}}}
r223
130{{{#!if (bp>9)&&(bb.substr(bp-9,9)=="000000000")
r221
131{{{#!if bb=bb.substr(0,bp-9), bp=bp-9
r209
132}}}}}}
r223
133{{{#!if (bp>4)&&(bb.substr(bp-4,4)=="0000")
r209
134{{{#!if bb=bb.substr(0,bp-4), bp=bp-4
135}}}}}}
r223
136{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
137{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
138}}}}}}
r223
139{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
140{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
141}}}}}}
r223
142{{{#!if (bp>1)&&(bb.substr(bp-1,1)=="0")
r209
143{{{#!if bb=bb.substr(0,bp-1), bp=bp-1
144}}}}}}
r207
145
r303
146그 다음 --앞자리에 0만 여러 개 적어놓고 장난치는 사람이 있을까봐-- au를 값으로 바꾼 다음 다시 문자열로 변환하여 앞자리에 있는 0들을 모두 삭제합니다. bu도 그렇게 둡니다.
147{{{#!if au=+au, au=au.toString(), bu=+bu, bu=bu.toString()
r231
148}}}
149
r305
150이 상태의 au를 ma로 저장하고 ab가 빈 문자열이 아니라면 ab도 ma에 저장합니다. 같은 방법으로 bu, bb을 mb에 저장합니다.
151{{{#!if ma=au, (ad!=-1)&&(ab!="")
r319
152a가 소수점 윗부분이 0이 되는 음수인 경우 "-0"으로 저장된 문자열은 정수값으로 바꿀 때 0이 되므로 ma앞에 -를 붙입니다.
153{{{#!if ma+="."+ab, (+au==0)&&(as[0]==45)
154{{{#!if ma="-"+ma
155}}}}}}}}}
r305
156{{{#!if mb=bu, (bd!=-1)&&(bb!="")
r319
157{{{#!if mb+="."+bb, (+bu==0)&&(bs[0]==45)
158{{{#!if mb="-"+mb
159}}}}}}}}}
r303
160
r207
161##== 덧셈, 뺄셈 ==
r66
162덧셈과 뺄셈 계산과정을 적어봅니다.
163{{{#!if (f=="+")||(f=="-")
r76
164
165a과 b의 소수점 윗부분은 정수이므로 쉽게 계산할 수 있습니다.
166{{{#!if f=="+"
167{{{#!if ru=(+au)+(+bu)
168}}}}}}
169{{{#!if f=="-"
170{{{#!if ru=(+au)-(+bu)
171}}}}}}
172
r125
173a와 b 모두가 정수이면 ap==0, bp==0이 되며, 이런 경우에는 소수점 아래 자릿수를 검산할 필요가 없습니다. a와 b 중 소수점 아래 자릿수가 있는 수가 있을 때에만 소수점 윗자리의 계산값이 얼마가 나오느냐를 보면서 소수점 아래의 자릿수를 정리하는 과정이 의미가 있습니다.
r76
174{{{#!if (ap>0)||(bp>0)
r142
175만약 소수점 아래를 계산한다면 자릿수를 똑같이 맞춰야 의미가 있으므로, 자릿수가 다른 경우 자릿수가 같게 만드는 과정을 먼저 거칩니다. 이를테면 a의 소수점 자릿수가 b의 소수점 자릿수보다 많으면 b뒤에 0을 더 추가하는 방식으로 변경합니다. b 자체가 정수여도 앞에 (소수점이 없을 경우) 이미 bb="", bp=0+0으로 초기화했으므로 동작될 것입니다.
176소수점 아래 최대 18자리까지의 수를 취급하므로 최대 18칸 차이가 나게 됩니다.
177ap>bp에서 ap-bp>0이 됩니다. ap-bp는 곧 ap가 bp보다 몇 칸만큼 더 많은지를 나타냅니다.
r161
178{{{#!if ap>bp
r228
179{{{#!if bp=ap, bb+=pd
r161
180}}}{{{#!if bb=bb.substr(0,ap)
r66
181}}}}}}
r67
182
183반대로 b의 소수점 자릿수가 많은 경우도 있습니다.
r161
184{{{#!if bp>ap
r228
185{{{#!if ap=bp, ab=ab+pd
r161
186}}}{{{#!if ab=ab.substr(0,bp)
r67
187}}}}}}
r161
188
r71
189위의 과정을 거치게 되면 소수점 아래 최대 자릿수를 똑같이 맞춘 상태에서 계산하게 되므로 ap==bp가 됩니다.
r66
190
r71
191a가 음수인 경우 소수점 아래 값은 순 숫자만 표기된 상태이므로 양수 취급으로 되지 않게 소수점 아래 값인 ab에 음수 표기를 남깁니다.
r68
192{{{#!if as[0]==45
193{{{#!if ab="-"+ab
194}}}}}}
r123
195마찬가지로 b가 음수인 경우 b의 소수점 아래 값은 음수이므로 소수점 아래 값인 bb에 음수 표기를 남깁니다. 10을 소수점 아래 자릿수만큼 제곱한 값으로 저장합니다.
r68
196{{{#!if bs[0]==45
197{{{#!if bb="-"+bb
198}}}}}}
199
r76
200이때 rb를 계산합니다.
r65
201{{{#!if f=="+"
r76
202{{{#!if rb=(+ab)+(+bb)
r65
203}}}}}}
204{{{#!if f=="-"
r76
205{{{#!if rb=(+ab)-(+bb)
r65
206}}}}}}
r75
207
r69
208소수점 아래끼리 더한 자릿수가 얼마나 되는지 보기 위해 rb를 문자열로 바꿉니다.
r86
209이 때 rb가 0이 아닐 경우에만 문자열로 변환합니다.
210{{{#!if (+rb>0)||(+rb<0)
r69
211{{{#!if this.rb=rb.toString()
212}}}
r71
213문자열로 된 rb의 길이를 rp로 정의합니다.
r69
214{{{#!if this.rp=rb.length
215}}}
r86
216}}}
r94
217
r73
218rb가 음수이면 rb의 첫번째(0번 index)의 문자열에는 마이너스(-)가 들어갑니다. 이 때는 rp를 rb의 마이너스 문자열을 세지 않은 자릿수가 되도록 앞에서 정의했던 rb.length에서 1만큼 줄여 정의합니다. ap, bp는 마이너스를 붙이기 전에 값이 고정되어 있으므로 rp처럼 줄일 필요가 없습니다.
r69
219{{{#!if rb[0]==45
r70
220{{{#!if rp=rp-1
r69
221}}}}}}
r57
222
r94
223ru값이 어떤지 보고 각 경우 rb값이 어떠한가에 따라 rb만 정리하거나 rb와 ru 모두 정리합니다.
r149
224중복 처리를 막기 위해 초기화된 ps 변수 하나를 가져옵니다.
r111
225
226소수점 아래 값의 부호와 소수점 위의 값의 부호가 서로 다른 경우 계산을 하기 위해 값을 하나 정의합니다.
227
r235
228{{{#!if tv=+(("1"+pd).substr(0,ap+1))
r162
229}}}
r111
230
r75
231Case 1 : ru가 0보다 큰 경우
r71
232ru는 정수이므로 ru가 0보다 크면 곧 ru는 1 이상의 정수이며, 1 이상이면 a+b 또는 a-b가 양수+음수 꼴이 되더라도 소수점 아래 정리를 하면 됩니다. rb를 정리하는 과정에서 ru에서 1을 빌려오거나 ru에 1이 더해질 수도 있습니다. 앞에서 rb를 string으로 바꿨으므로 +rb를 다룹니다.
r65
233{{{#!if ru>0
r75
234Case 1-1 : rb가 0 이상인 경우
r232
235{{{#!if (+rb>=0)&&!ps
r73
236rb가 소수점 아래 자릿수를 초과하여 소수점 위의 수를 계산하게 생겼다면 ap=bp인 상황에서 rp>ap가 됩니다. rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
r71
237{{{#!if rp>ap
238{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r69
239}}}}}}
r73
240rb가 소수점 아래 자릿수를 초과하지 않을 경우 rb를 다시 정의할 필요 없이 그대로 둡니다.
r71
241{{{#!if rp<=ap
r72
242}}}
r104
243{{{#!if ps=true
r73
244}}}
r104
245}}}
r73
246
r94
247Case 1-2 : rb가 음수인 경우 ru에서 1을 빌려옵니다. 1보다 작은 양수값에서 1보다 작은 양수값을 빼면 -1보다 작을 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
248{{{#!if (+rb<0)&&!ps
r73
249{{{#!if ru=ru-1
250}}}
r111
251소수점 아래 자릿수인 ap만큼 10을 제곱한 값(tv)을 rb에서 증가시켜 rb를 재정의합니다. 그러면 rb는 양수가 됩니다. 그리고 rb를 다시 문자열로 변환합니다.
252{{{#!if rb=tv+(+rb)
r73
253}}}{{{#!if rb=rb.toString()
254}}}
r104
255{{{#!if ps=true
256}}}}}}
r73
257정리과정을 끝냈으면 ru를 string으로 변환합니다.
258{{{#!if this.ru=ru.toString()
r71
259}}}}}}
260
r75
261Case 2 : ru가 0인 경우 ru가 0이 되면 rb의 값이 양수인지 음수인지에 따라 달라집니다.
r65
262{{{#!if ru==0
r75
263Case 2-1 : rb가 0 이상인 경우
r232
264{{{#!if (+rb>=0)&&!ps
r73
265rb가 양수이면서 rb가 자릿수를 초과한 경우 rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
266{{{#!if rp>ap
267{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r104
268}}}}}}
r327
269ru를 string으로 변환합니다.
270{{{#!if ru=ru.toString()
271}}}
272{{{#!if ps=true
273}}}}}}
r75
274Case 2-2 : rb가 음수인 경우
r232
275{{{#!if (+rb<0)&&!ps
r75
276rb가 음수이면서 rb가 자릿수를 초과한 경우 값이 0인 ru에 1을 빼야 합니다. 그리고 rb가 "-"+숫자 꼴이므로 문자열의 1번 index에 해당하는 1을 지워야 합니다. 앞에서 rb가 음수인 경우 rp는 rb의 마이너스(-)가 차지하는 자릿수를 계산하지 않은 값 곧 숫자들이 차지하는 자릿수이므로, rb를 길이가 rp-1인 숫자들로 다시 정의합니다.
r73
277{{{#!if rp>ap
r75
278{{{#!if ru=ru-1, rb=rb.substr(2, rp-1)
279}}}}}}
280rb가 자릿수를 초과하지 않은 경우 rb에서 "-"를 뺀 문자열로 rb를 다시 정의합니다.
r101
281{{{#!if rp<=ap
r76
282{{{#!if rb=rb.substr(1, rp)
r104
283}}}}}}
r327
284ru를 string으로 변환합니다.
285{{{#!if ru=ru.toString()
286}}}
r325
287만일 -0.xxxx 같이 여전히 rb<0이고 ru==0인 상태라면 rb에 생겼던 마이너스 부호를 떼어내 왼쪽으로 붙입니다. ns를 "-"으로 바꿉니다.
r326
288{{{#!if +ru==0
r325
289{{{#!if ns="-"
r324
290}}}}}}
r327
291ru가 음수이면 ru앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
292{{{#!if +ru<0
293{{{#!if ru=ru.substr(1), ns="-"
294}}}}}}
r324
295{{{#!if ps=true
296}}}}}}
r65
297}}}
r74
298
r75
299Case 3 : ru가 0보다 작은 경우. 곧 -1 이하인 음수가 되는 경우.
r65
300{{{#!if ru<0
r76
301Case 3-1 : rb가 0 이하인 경우
r232
302{{{#!if (+rb<=0)&&!ps
r76
303rb가 음수이면서 자릿수를 초과한 경우 ru에 -1을 빼고, rb의 음수기호(-)와 첫번째 숫자인 문자열 "1"을 뺀 문자열로 rb를 다시 정의합니다.
304{{{#!if rp>ap
r80
305{{{#!if rb=rb.substr(2, rp-1)
r65
306}}}
r80
307}}}
r107
308rb가 자릿수를 초과하지 않은 경우 rp는 음수기호를 제외한 숫자 자릿수이므로 rb를 음수기호만을 뺀 문자열로 다시 정의합니다. 단, rb가 0이 되면 rp==1이 되므로 rb==0인 경우는 제외합니다.
r101
309{{{#!if (rp<=ap)&&(+rb<0)
r106
310{{{#!if rb=rb.substr(1, rp)
r104
311}}}}}}{{{#!if ps=true
312}}}}}}
r82
313Case 3-2 : rb가 0보다 큰 경우. 소수점 아래 부분을 보면 -1보다 큰 음수값에서 -1보다 큰 음수값을 빼면 1보다 클 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
314{{{#!if (+rb>0)&&!ps
r82
315ru<=-1이므로 ru+1를 해도 최대 0이 됩니다.
316{{{#!if ru=ru+1
r75
317}}}
r111
318rb>0에서 rb은 음수(계산결과)의 음수(마이너스값이 줄어듦)이므로 rb의 자릿수인 rp만큼 10을 제곱한 값(tv)에서 rb을 '''뺀''' 값으로 rb를 재정의합니다. 그러면 rb는 양수이지만 계산결과인 음수에 맞춘 값이 됩니다. 그리고 rb를 다시 문자열로 변환합니다. 변환합니다.
319{{{#!if rb=tv-(+rb)
r82
320}}}{{{#!if rb=rb.toString()
r104
321}}}{{{#!if ps=true
322}}}}}}
r76
323정리과정을 끝냈으면 ru를 string으로 변환합니다.
324{{{#!if this.ru=ru.toString()
325}}}
r325
326-0.xxxx 같이 (ru==0인데) 연산결과가 -1보다 큰 음수로 나오는 경우가 있으므로 ru 앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
r326
327{{{#!if +ru<0
r325
328{{{#!if ru=ru.substr(1), ns="-"
r326
329}}}}}}
330{{{#!if +ru==0
331{{{#!if ns="-"
332}}}}}}
r76
333}}}
334여기까지가 소수점 아래 자릿수 숫자들의 계산과정입니다.
335}}}
r71
336
r94
337a와 b 모두 정수인 경우 ap, bp는 모두 0이 되므로 ru만을 그대로 문자열로 바꾸면 되며 소수점 아래(rb)는 표기해야 할 필요가 없으므로 rb="", (소수점 아래 자릿수)rp=0을 반환합니다.
338{{{#!if (ap==0)&&(bp==0)
339{{{#!if this.ru=ru.toString(), rb="", rp=0+0
340}}}}}}
341
r95
342rb==0인 경우 rb="", rp=0을 반환합니다.
343{{{#!if +rb==0
344{{{#!if rb="", rp=0+0
345}}}}}}
346
r99
347이제 rb=""이 아닌 경우 소수점 아래 숫자 정리를 합니다.
348rp를 rb의 문자열 길이로 다시 정의합니다.
r97
349{{{#!if rb!=""
350{{{#!if this.rp=rb.length
r103
351}}}
r97
352
r99
353+"000100"을 숫자로 바꾸면 100이 되는 문제가 있습니다. 이처럼 소수점 아래 자릿수를 연산한 결과를 문자열로 바꿨을 때 기존 소수점 아래 자릿수보다 작은 길이가 나오면 앞쪽에 0을 보충합니다.
354앞에서 ap,bp를 똑같이 맞췄으므로 ap를 가져옵니다. 자릿수가 모자랄 경우 0을 하나씩 보충합니다.
355{{{#!if rp<ap
r228
356{{{#!if rb=pd.substr(0,ap-rp)+rb
r99
357}}}}}}
358
359앞에 0을 채웠다면 이제, 소수점 아래로 나오는 숫자를 보고 마지막에서부터 0이 나오면 한 자리씩 지우는 과정을 시작합니다.
360
r164
361여기까지가 덧셈 또는 뺄셈연산의 계산과정이며 과정은 이후 rb 정리 과정으로 넘어갑니다.
r166
362}}}}}}
r76
363
r259
364##== 곱셈 & 나눗셈 ==
365##=== 숫자 초기화 ===
r186
366{{{#!if (f=="*")||(f=="/")
367곱셈 및 나눗셈 연산과정을 봅니다.
r64
36818자리 숫자로 입력할 수 있는 최대 정수는 999,999,999,999,999,999입니다.
369다행히 999,999,999,999,999,999*9=8,999,999,999,999,999,991 < long 한계치 9,223,372,036,854,775,807 이라서 a*각 자릿수로 덧셈해볼 수는 있습니다.
r120
370
r303
371a 또는 b가 음수가 될 경우 as 또는 bs 문자열은 "-" 기호가 붙으므로, 이것을 이용한 조건문을 하나 만들어 a와 b 둘의 부호가 서로 다를 경우 (a만 음수이거나 b가 음수일 경우) 계산 결과에 부호를 표시할 수 있게 만듭니다.
r293
372{{{#!if (as[0]==45)^(bs[0]==45)
r159
373{{{#!if ns="-"
374}}}}}}
r126
375a 또는 b가 음수가 될 경우 소수점 윗부분 문자열인 au 또는 bu에서 마이너스(-)를 제거합니다.
376{{{#!if au[0]==45
377{{{#!if au=au.substr(1,ad-1)
378}}}}}}
379{{{#!if bu[0]==45
380{{{#!if bu=bu.substr(1,bd-1)
381}}}}}}
382
r259
383##=== 자릿수 측정 ===
384나누는 자릿수에 맞춰 결과를 표시하고자 ac, bc를 자릿수를 나타내는 값으로 정의합니다.
385먼저 au는 앞에 적어놓은 0을 제거한 문자열이므로 +au>0인 경우 ac를 au의 문자열 길이에서 1을 뺀 값으로 정의합니다.
386{{{#!if +au>0
387{{{#!if ac=au.length-1
388}}}}}}
r302
389(au, ab 둘다 0인 경우 앞에 처리하는 식이 있고, au, ab 둘 중 하나라도 0이 아닐 때) au가 0이라면 ab는 단순 정수값으로 옮겼을 때 0보다 큰 값이 나옵니다. 소수점 아래 처음으로 0이 아닌 수가 나오는 자릿수를 구한 다음 덧셈 연산에서 그 수의 역원이 되는 수를 ac로 정의합니다. 이를 구하고자 ab의 뒤에 0을 더 붙여 18자리 숫자로 만든 다음 정수로 바꾸어 구합니다.
r259
390{{{#!if +au==0
391{{{#!if ac=ab+pd, ac=ac.substr(0,18), ac=+ac, ac=ac.toString(), ac=ac.length-19
392}}}}}}
r207
393
r259
394bc도 a와 같은 방법으로 정의합니다.
395{{{#!if +bu>0
396{{{#!if bc=bu.length-1
397}}}}}}{{{#!if +bu==0
398{{{#!if bc=bb+pd, bc=bc.substr(0,18), bc=+bc, bc=bc.toString(), bc=bc.length-19
399}}}}}}
400
401##=== 0인자 처리 ===
r186
402a 또는 b값이 0이 되려면 au, ab 둘 다 0이 되거나 bu, bb 둘 다 0이 되어야 합니다. a 또는 b 값이 0일 경우 당연히 음수 부호가 표시되지 않습니다.
r174
403{{{#!if ((+au==0)&&(+ab==0))||((+bu==0)&&(+bb==0))
r190
404곱셈에서 0을 곱하면 0이 되므로, 곱셈의 경우 a 또는 b가 0이 될 때 계산 결과에 0을 반환합니다.
405{{{#!if f=="*"
r159
406{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
r133
407}}}}}}
r190
408나눗셈에서 나누는 수(b)가 0이 될 경우 오류를 반환하고 ps=true를 걸어 나눗셈 연산이 되지 않게 만듭니다.
409{{{#!if f=="/"
410{{{#!if ((+bu==0)&&(+bb==0))
411error code 03 번 : 0으로 나눌 수 없습니다.
412{{{#!if eb=03, ps=true
413}}}}}}
414나누는 수가 0이 아니면서 나눌 대상이 0이 될 경우 곱셈에서 0을 곱하는 것처럼 계산 결과에 0을 반환합니다.
415{{{#!if ((+au==0)&&(+ab==0))&&((+bu!=0)||(+bb!=0))
416{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
417}}}}}}
r224
418}}}}}}
r198
419곱셈과 나눗셈에서 a와 b 모두 0이 아닌 경우를 봅니다.
r133
420{{{#!if ((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
421
r264
422##=== 3차 초기화 ===
r203
423{{{#!if f=="*"
424곱셈계산에서 18자리씩 곱셈을 할 수 있도록 입력했던 a와 b의 문자열을 확장할 것입니다.
r198
425
r124
426a와 b 각각 소수점 윗자리와 소수점 아래자리의 문자열의 빈 공간을 0으로 채워 18자로 만듭니다.
427소수점 윗자리는 왼쪽에서 0을 채워나갑니다.
r228
428{{{#!if au = pd + au
r172
429+18자}}}{{{#!if au=au.substr(au.length-18,18)
r145
430}}}
r228
431{{{#!if bu = pd + bu
r172
432+18자}}}{{{#!if bu=bu.substr(bu.length-18,18)
r145
433}}}
r124
434
435소수점 아래자리는 오른쪽에서 0을 채웁니다. (ap, bp값은 보존됩니다.)
r228
436{{{#!if ab += pd
r145
437+18자}}}{{{#!if ab=ab.substr(0,18)
438}}}
r228
439{{{#!if bb += pd
r145
440+18자}}}{{{#!if bb=bb.substr(0,18)
r191
441}}}}}}
r203
442
443{{{#!if f=="/"
r204
444나눗셈은 소수점 위 18번째 자리부터 내려가면서 처음으로 0이 아닌 숫자가 있으면 그 숫자가 처음 숫자가 되도록 숫자를 왼쪽으로 밀어두려고 합니다. 그 다음 오른쪽을 0으로 채웁니다.
r267
445
446a에서 au가 0인 경우 18자리 au를 18자리 ab로 바꾸고 ab를 18자의 0(pd)으로 채웁니다.
447소수점 아래 자리를 매겼던 ab가 소수점 위인 au자리로 옮겨지게 되므로 정수로 바꾸었다 다시 문자열로 바꿈으로써 왼쪽에 불필요하게 붙어있는 0을 삭제합니다.
448{{{#!if +au==0
449{{{#!if au=ab, ab=pd, au=+au, au=au.toString()
450}}}}}}
451
r206
452au를 왼쪽으로 밀 경우 남게 되는 자릿수를 변수 tu로 둡니다. (후술할 아래 곱셈연산과 겹치지 않습니다.)
r228
453{{{#!if tu=18-au.length, au=au+ab.substr(0,tu)+pd, ab=ab.substr(tu)+pd, au=au.substr(0,18), ab=ab.substr(0,18)
r203
454}}}
r267
455
456b도 a와 같은 방법으로 초기화합니다.
457{{{#!if +bu==0
458{{{#!if bu=bb, bb=pd, bu=+bu, bu=bu.toString()
459}}}}}}
r228
460{{{#!if tu=18-bu.length, bu=bu+bb.substr(0,tu)+pd, bb=bb.substr(tu)+pd, bu=bu.substr(0,18), bb=bb.substr(0,18)
r203
461}}}
r207
462
r203
463}}}
r204
464}}}
r190
465여기까지 곱셈 또는 나눗셈에서 숫자를 초기화하는 과정입니다.
r224
466}}}
r133
467
r264
468##=== 곱셈 ===
r190
469a와 b 모두 0이 아닌 경우에서 곱셈을 연산하는 과정입니다.
470{{{#!if (f=="*")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
r149
471곱셈은 18자리를 끊어서 계산합니다. 소수점 아래 18자리의 아래인 제19~36번 자리를 ri로 둡니다. 소수점 위 19~36번째 자리는 rs로 두어 ri, rb, ru, rs 순으로 계산합니다.
r204
472소수점 위 18자리, 소수점 아래 18자리인 두 수를 곱하면 해당하는 자리별로 곱셈을 할 때 최대 (18+18)**2=1296회를 곱해야 합니다.
r135
473
r147
474앞으로 있을 계산은 다음과 같습니다.
r135
475 * ri를 더했더니 ri가 19자리 숫자로 넘치면 넘친 앞의 1자리를 rb로 넘깁니다.
r147
476 * rb가 19자리로 넘쳤다면 넘친 앞의 1자리를 ru로 넘깁니다.
477 * ru가 19자리로 넘친다면 넘친 앞의 1자리를 rs로 넘깁니다.
r135
478(rs는 상용로그로 보았을 때 log a<18, log b<18 에서 log (a*b) = log a + log b < 36이므로 19자리로 넘치지 않습니다.)
479문자열로 바꾸고 문자열을 쪼갠 다음 숫자로 바꾸는 과정입니다. 이를 if로 바꾸면 다음과 같습니다.
r149
480{{{#!if false
r135
481{{{#!if ri=ri.toString(), ri.length==19
r249
482{{{#!if rb=(+rb)+(+ri.substr(0,1)), ri=(+ri.substr(1,18))
r135
483}}}}}}
484{{{#!if rb=rb.toString(), rb.length==19
r249
485{{{#!if ru=(+ru)+(+rb.substr(0,1)), rb=(+rb.substr(1,18))
r135
486}}}}}}
487{{{#!if ru=ru.toString(), ru.length==19
r249
488{{{#!if rs=(+rs)+(+ru.substr(0,1)), ru=(+ru.substr(1,18))
r135
489}}}}}}
r149
490}}}
r151
491변수 tv, tw, i, ps를 가져옵니다. tw는 0, tv는 1, i는 0, ps는 false으로 초기화 된 채로 있습니다. 연산 과정 중간중간에 마지막 자릿수를 보정하고자 10씩 곱하게 됩니다. ri에서 최대 18자리에서 1자리 수를 곱하면 19자리가 될 수 있으므로 곱셈할 때마다 19자리로 넘칠때마다 넘치는 숫자는 rb로 넘깁니다.
r153
492ri부분을 합산합니다. ab*bb 의 절반을 처리합니다. (자릿수끼리 대입했을 때 처리되는 부분이 먼저 입력한 절반이 나중에 입력하는 절반보다 더 많지만, 편의상 절반이라고 적습니다.)
r149
493## for i=0 to 17
r348
494{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
495}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
496}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
497}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
498}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
499}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
500}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
501}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
502}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
503}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
504}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
505}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
506}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
507}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
508}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
509}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
510}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
511}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), rb=ps?rb+(+tw.substr(0,1)):rb, ri=ps?ri+(+tw.substr(1)):ri+(+tw), ri=ri.toString(), ps=(ri.length==19), rb=ps?rb+(+ri.substr(0,1)):rb, ri=ps?(+ri.substr(1)):(+ri), i+=1, tv*=10
r149
512}}}
r134
513
r151
514##rb
r184
515rb부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bb의 나머지 절반 + au*bb의 절반), ab*bu의 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r349
516{{{#!if i=0+0, tv=1
r151
517}}}
518##for i=0 to 17
r358
519{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
520}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r152
521}}}
r153
522## i=1
r358
523{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
524}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
525}}}
526## i=2
r358
527{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
528}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
529}}}
530## i=3
r358
531{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
532}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
533}}}
534## i=4
r358
535{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
536}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
537}}}
538## i=5
r358
539{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
540}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
541}}}
542## i=6
r358
543{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
544}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
545}}}
546## i=7
r358
547{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
548}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
549}}}
550## i=8
r358
551{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
552}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
553}}}
554## i=9
r358
555{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
556}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
557}}}
558## i=10
r358
559{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
560}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
561}}}
562## i=11
r358
563{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
564}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
565}}}
566## i=12
r358
567{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
568}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
569}}}
570## i=13
r358
571{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
572}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
573}}}
574## i=14
r358
575{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
576}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
577}}}
578## i=15
r358
579{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
580}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
581}}}
582## i=16
r358
583{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
584}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
585}}}
586## i=17
r358
587{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb)
r349
588}}}{{{#!if tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv, tw=tw.toString(), ps=(tw.length==19), ru=ps?ru+(+tw.substr(0,1)):ru, rb=ps?rb+(+tw.substr(1)):rb+(+tw), rb=rb.toString(), ps=(rb.length==19), ru=ps?ru+(+rb.substr(0,1)):ru, rb=ps?(+rb.substr(1)):(+rb), i+=1, tv*=10
r153
589}}}
r134
590
r153
591##ru
r184
592ru부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bu의 나머지 절반 + au*bu의 절반), au*bb의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r349
593{{{#!if i=0+0, tv=1
r153
594}}}
r155
595##for i=0 to 17
r350
596{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
597}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
598}}}
599## i=1
r350
600{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
601}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
602}}}
603## i=2
r350
604{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
605}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
606}}}
607## i=3
r350
608{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
609}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
610}}}
611## i=4
r350
612{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
613}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
614}}}
615## i=5
r350
616{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
617}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
618}}}
619## i=6
r350
620{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
621}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
622}}}
623## i=7
r350
624{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
625}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
626}}}
627## i=8
r350
628{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
629}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
630}}}
631## i=9
r350
632{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
633}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
634}}}
635## i=10
r350
636{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
637}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
638}}}
639## i=11
r350
640{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
641}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
642}}}
643## i=12
r350
644{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
645}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
646}}}
647## i=13
r350
648{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
649}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
650}}}
651## i=14
r350
652{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
653}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
654}}}
655## i=15
r350
656{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
657}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
658}}}
659## i=16
r350
660{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
661}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r155
662}}}
663## i=17
r350
664{{{#!if tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1)), tw=tw.toString(), ps=(tw.length==19), rs=ps?rs+(+tw.substr(0,1)):rs, ru=ps?ru+(+tw.substr(1)):ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru)
r349
665}}}{{{#!if tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString(), ps=(ru.length==19), rs=ps?rs+(+ru.substr(0,1)):rs, ru=ps?(+ru.substr(1)):(+ru), i+=1, tv*=10
r184
666}}}
r349
667
r156
668##rs
669rs부분을 합산합니다. au*bu의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다. 소수점 윗자리는 많아야 36자리이므로 rs에서 더 이상 넘치지 않습니다.
670{{{#!if i=0+0, tv=1, ps=false
671}}}
672##for i=0 to 17
r184
673{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
674}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
675}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
676}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
677}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
678}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
679}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
680}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
681}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
682}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
683}}}
r184
684{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
685}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
686}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
687}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
688}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
689}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
690}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
691}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
692}}}
r190
693여기까지가 곱셈에서 a*b 의 연산 과정이며 rb 정리 부분으로 넘어갑니다.
r164
694}}}
695
r261
696##=== 나눗셈 ===
r194
697a와 b 모두 0이 아닌 경우에서 나눗셈을 연산하는 과정입니다.
698{{{#!if (f=="/")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
699
700au, ab, bu, bb를 18자로 만들었으므로 36자리 정수의 나눗셈으로 봅니다.
701a/b=(au+ab)/(bu+bb)=(+(au.substr(0,18)+ab.substr(0,18)))/(+(bu.substr(0,18)+bb.substr(0,18)))와 같습니다.
r195
702
r229
703##몫 서술
704제일 높은 자리부터 내려오면서 처음으로 0이 아닌 수를 왼쪽으로 당기는 과정을 거쳤으므로 (1부터 시작하는 18자리+18자리 숫자)/(1부터 시작하는 18자리+18자리 수) 연산이 됩니다.
705
706{{{#!if ps=false
r342
707}}}ps를 false로 초기화합니다. 변수에 값을 주는 여부로 ps를 사용합니다.
r229
708
709##i=0
710{{{#!if br=false
711}}}다시 정렬된 bu, bb의 값은 바뀌지 않습니다. bu, bb로 나눈 몫만큼 au, ab에서 감소시킨 다음 au와 ab를 다시 정렬시키며, au와 ab가 모두 0이 되면 더 이상 계산하지 않도록 br를 true로 반환합니다.
r230
712그 다음 계산을 편하게 할 수 있도록 텍스트값으로 된 au, ab, bu, bb를 정수값으로 변환합니다.
r291
713{{{#!if au=+au, ab=+ab, bu=+bu, bb=+bb
r230
714}}}
r229
715
r338
716먼저 au를 bu로 나눈 몫을 tw로 정의합니다. 정수를 정수로 나누면 몫만 계산되며, 100,000,000,000,000,000 이상 999,999,999 999,999,999 이하의 한 정수를 100,000,000,000,000,000 이상의 다른 한 정수로 나눈 몫이므로 tw의 값은 최소 0 최대 9가 됩니다.
r230
717{{{#!if tw=au/bu
718}}}
719bu, bb를 각각 tw만큼 곱한 값을 tx, ty로 정의합니다.
720{{{#!if tx=bu*tw, ty=bb*tw
721}}}
r341
722이 때 ty가 19자리가 되면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더하고 아래 18자리의 값을 ty로 다시 정의합니다. tx는 19자리 숫자가 되어도 문제가 없습니다. 만일 ty가 19자리가 되지 않는다면 tx와 ty를 그대로 둡니다. 그 다음 ty를 정수로 바꿉니다.
r343
723{{{#!if ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r239
724}}}
r340
725이렇게 하면 tx=bu*tw<=au가 됩니다. (bu가 au보다 크면 tw는 tw의 정의에서 값이 0이 되므로 부등호가 성립됩니다.)
726
r338
727(2.1/1.6 처럼) ty가 넘쳐 tx 값이 더해지는 경우가 있으므로 몫이 유효한 값인지 검산합니다. 만일 tx ty 가 기존 au ab을 넘게 되면 tw에서 1을 빼고, tx, ty를 다시 정의합니다. 그러나 tw가 이미 0이 되었을 경우 tw를 0으로 둡니다.
r231
728{{{#!if (tx>au)||((tx==au)&&(ty>ab))
r338
729{{{#!if tw=(tw==0)?0:tw-1, tx=bu*tw, ty=bb*tw
r231
730}}}
r339
731마찬가지로 ty가 19자리가 된다면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더합니다. 그 다음 ty를 정수로 바꿉니다.
r343
732{{{#!if ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r239
733}}}
734}}}
r231
735이렇게 만들어진 tx, ty가 있으면 이를 반영합니다.
r340
736au에서 tx를, ab에서 ty를 뺍니다. 만약 ty>ab일 경우 au에서 1을 가져와 (au에서 1을 빼고) ab에 1,000,000,000,000,000,000을 더한 다음 계산합니다.
r233
737{{{#!if ty>ab
r234
738{{{#!if au-=1, ab+=+("1"+pd)
r231
739}}}}}}
r233
740{{{#!if au-=tx, ab-=ty
r340
741}}}
r253
742몫인 tw를 문자열로 바꾸고 tm의 오른쪽에 더합니다.
743{{{#!if tw=tw.toString(), tm+=tw
744}}}
r241
745au, ab에서 몫을 빼고 나니 au, ab가 모두 0으로 된다면 더 이상 계산을 하지 않아야 하므로 br를 true로 반환합니다.
746{{{#!if (au==0)&&(ab==0)
r233
747{{{#!if br=true
748}}}}}}
r241
749어느 하나가 0이 되지 않는다면 br는 여전히 false이므로 !br일 때 자릿수를 옮깁니다.
750{{{#!if !br
r233
751au, ab를 문자열로 다시 바꿉니다.
752{{{#!if au=au.toString(), ab=ab.toString()
753}}}
r344
754au가 여전히 18자리 숫자일 경우 au의 첫번째 자리를 분리해 내어 tn으로 정의하고 나머지 17자리를 au로 둡니다. 그렇지 않을 경우 (au가 17자리 미만의 숫자가 되었다면) tn은 빈 문자열으로 두고 au의 왼쪽을 0(pd)으로 채운 다음 (적어도 19자리가 되는 문자열을) 뒤에서 17번째 자리부터 가지고 와 au로 만듭니다.
755{{{#!if ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17)
r341
756}}}
r234
757ab가 18자리 미만의 숫자가 되었다면 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
r341
758{{{#!if ab=(ab.length<18)?(pd+ab).substr(-18):ab
759}}}
r234
760au의 뒤로 ab의 처음 자리를 끌어옵니다.
761{{{#!if au+=ab.substr(0,1)
r233
762}}}
r234
763ab의 나머지 17자리를 앞으로 당긴 다음 "0"을 더합니다.
r344
764{{{#!if ab=ab.substr(1)+"0"
r241
765}}}
766여기까지가 자릿수를 한 칸씩 옮기는 과정입니다.
767}}}
r234
768##i=1 part 1
r239
769몫으로 기록할 숫자의 첫번째 자리를 구했다면, 그 다음 자리의 숫자를 찾기 위해 (변수 tn으로 만들 수 있는 여분의 1자리 +) 18자리 + 18자리 숫자를 18자리+18자리 숫자로 나누는 계산을 합니다. tn이 9가 될 경우 9로 시작하는 19자리 숫자를 long integer로 모두 표현할 수 없으므로 10**18 자리부터 먼저 계산합니다. 10**18의 1번째 숫자의 몫을 구한 다음 나머지를 18자리 숫자에 더하는 과정(part 1)을 거친 다음 그 18자리에서 몫을 구하는 과정(part 2)을 거칩니다.
r235
770
r240
771au와 ab를 정수로 다시 바꾸고 tz를 0으로 초기화합니다. 그리고 tn이 빈 문자열이 아니라면 (앞에 au에서 한 자리 수를 떼온 것이므로) tn에 0을 더하여 19자리로 만들고 몫을 구합니다.
r345
772{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r239
773tn을 19자리 정수로 바꿉니다.
r342
774{{{#!if tn+=pd, tn=+tn
r235
775}}}
776tz를 몫으로 정의합니다. 앞의 tw를 처리하는 방법과 같습니다. tn을 정수로 만들었으므로 소수점 아래를 비교한다면 정수의 소수점 아래에 해당하는 0과 비교합니다.
r342
777{{{#!if tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString()
r239
778}}}
r342
779마찬가지로 ty가 19자리 숫자이면 1자리를 떼어 tx에 더합니다.
r343
780{{{#!if ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r342
781}}}
782앞의 tw를 처리할 때 au와 tx를 비교한 것처럼 tz를 처리할 때 tn와 tx를 비교합니다.
r235
783{{{#!if (tx>tn)||((tx==tn)&&(ty>0))
r342
784{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz
r343
785}}}{{{#!if ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r239
786}}}}}}
r238
787tn에서 나누어떨어지는 값을 뺀 나머지를 반영하여 au, ab에 더합니다. 소수점 아래 부분인 ab보다 ty가 크다면 tn에서 1을 빼어 계산합니다.
r237
788{{{#!if ty>ab
789{{{#!if tn-=1, ab+=+("1"+pd)
r236
790}}}}}}
r237
791{{{#!if au+=(tn-tx), ab-=ty
r234
792}}}
r237
793tn을 빈 문자열로 초기화합니다.
794{{{#!if tn=""
795}}}
796}}}
r234
797##i=1 part 2
r239
798br(0으로 나누어떨어짐) 이 걸려있으면 실행하지 않습니다. 그러므로 전체적으로 조건을 !br로 둔 다음 계산을 진행합니다.
r238
799{{{#!if !br
r343
800tw, tx, ty를 정의하고 처리하는 과정은 앞자리에서 몫을 찾는 과정과 동일합니다. 앞의 part 1에서 이미 au, ab를 정수로 만들었으므로 여기에 au, ab를 정수로 만드는 처리를 할 필요가 없습니다.
r344
801{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty
802}}}
r240
803ty를 정수로 바꾸는 과정을 아래 if 조건문으로 병합합니다.
804{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
r344
805{{{#!if tw=(tw==0)?0:tw-1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r240
806}}}}}}
r253
807{{{#!if ty>ab
r240
808{{{#!if au-=1, ab+=+("1"+pd)
809}}}}}}{{{#!if au-=tx, ab-=ty
r343
810}}}
r254
811앞에서 계산된 tz의 값을 tw에 더한 다음 tw를 문자열로 바꿉니다. 그리고 tm에 문자열로 바꾼 tw을 더합니다.
r253
812{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
813}}}
r281
814au와 ab가 모두 0이 될 때 br를 true로 정의합니다.
r241
815{{{#!if (au==0)&&(ab==0)
816{{{#!if br=true
r240
817}}}}}}}}}
818어느 자릿수부터 br가 true로 되면 이후 자릿수 옮겨 몫을 구하는 과정이나 나머지를 정리하는 과정을 더 이상 할 필요가 없습니다.
r241
819{{{#!if !br
r240
820au, ab를 문자열로 다시 바꾸고 처리하는 과정은 동일합니다.
821{{{#!if au=au.toString(), ab=ab.toString()
r239
822}}}
r252
823ps를 au 자릿수가 18이 되었을 때 true가 되는 논리값으로 정의합니다.
r344
824{{{#!if ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17)
r239
825}}}
r344
826{{{#!if ab=(ab.length<18)?(pd+ab).substr(-18):ab
r240
827}}}
r344
828{{{#!if au+=ab.substr(0,1), ab=ab.substr(1)+"0"
829}}}}}}
r240
830##i=2
r242
831이후부터 과정은 동일합니다. 많아야 소수점 위 36자리, 소수점 아래 36자리 모두를 쓰면 72개이므로 총 72회(for i=0 to i=71)를 진행합니다.
r346
832{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
833{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
834{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r240
835}}}}}}
836{{{#!if ty>ab
837{{{#!if tn-=1, ab+=+("1"+pd)
838}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r345
839}}}}}}{{{#!if !br
840{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
841{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r241
842}}}}}}
r255
843{{{#!if ty>ab
r241
844{{{#!if au-=1, ab+=+("1"+pd)
r346
845}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r241
846{{{#!if br=true
r256
847}}}}}}}}}
r241
848{{{#!if !br
r345
849{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
850}}}}}}
r242
851##i=3
852{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
853{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
854{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
855}}}}}}
856{{{#!if ty>ab
857{{{#!if tn-=1, ab+=+("1"+pd)
858}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
859}}}}}}{{{#!if !br
860{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
861{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
862}}}}}}
r256
863{{{#!if ty>ab
r242
864{{{#!if au-=1, ab+=+("1"+pd)
r346
865}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
866{{{#!if br=true
867}}}}}}}}}
868{{{#!if !br
r346
869{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
870}}}}}}
r242
871##i=4
872{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
873{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
874{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
875}}}}}}
876{{{#!if ty>ab
877{{{#!if tn-=1, ab+=+("1"+pd)
878}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
879}}}}}}{{{#!if !br
880{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
881{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
882}}}}}}
r256
883{{{#!if ty>ab
r242
884{{{#!if au-=1, ab+=+("1"+pd)
r346
885}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
886{{{#!if br=true
887}}}}}}}}}
888{{{#!if !br
r346
889{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
890}}}}}}
r242
891##i=5
892{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
893{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
894{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
895}}}}}}
896{{{#!if ty>ab
897{{{#!if tn-=1, ab+=+("1"+pd)
898}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
899}}}}}}{{{#!if !br
900{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
901{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
902}}}}}}
r256
903{{{#!if ty>ab
r242
904{{{#!if au-=1, ab+=+("1"+pd)
r346
905}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
906{{{#!if br=true
907}}}}}}}}}
908{{{#!if !br
r346
909{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
910}}}}}}
r242
911##i=6
912{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
913{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
914{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
915}}}}}}
916{{{#!if ty>ab
917{{{#!if tn-=1, ab+=+("1"+pd)
918}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
919}}}}}}{{{#!if !br
920{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
921{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
922}}}}}}
r256
923{{{#!if ty>ab
r242
924{{{#!if au-=1, ab+=+("1"+pd)
r346
925}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
926{{{#!if br=true
927}}}}}}}}}
928{{{#!if !br
r346
929{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
930}}}}}}
r242
931##i=7
932{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
933{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
934{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
935}}}}}}
936{{{#!if ty>ab
937{{{#!if tn-=1, ab+=+("1"+pd)
938}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
939}}}}}}{{{#!if !br
940{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
941{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
942}}}}}}
r256
943{{{#!if ty>ab
r242
944{{{#!if au-=1, ab+=+("1"+pd)
r346
945}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
946{{{#!if br=true
947}}}}}}}}}
948{{{#!if !br
r346
949{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
950}}}}}}
r242
951##i=8
952{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
953{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
954{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
955}}}}}}
956{{{#!if ty>ab
957{{{#!if tn-=1, ab+=+("1"+pd)
958}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
959}}}}}}{{{#!if !br
960{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
961{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
962}}}}}}
r256
963{{{#!if ty>ab
r242
964{{{#!if au-=1, ab+=+("1"+pd)
r346
965}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
966{{{#!if br=true
967}}}}}}}}}
968{{{#!if !br
r346
969{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
970}}}}}}
r242
971##i=9
972{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
973{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
974{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
975}}}}}}
976{{{#!if ty>ab
977{{{#!if tn-=1, ab+=+("1"+pd)
978}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
979}}}}}}{{{#!if !br
980{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
981{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
982}}}}}}
r256
983{{{#!if ty>ab
r242
984{{{#!if au-=1, ab+=+("1"+pd)
r346
985}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
986{{{#!if br=true
987}}}}}}}}}
988{{{#!if !br
r346
989{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
990}}}}}}
r242
991##i=10
992{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
993{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
994{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r242
995}}}}}}
996{{{#!if ty>ab
997{{{#!if tn-=1, ab+=+("1"+pd)
998}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
999}}}}}}{{{#!if !br
1000{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1001{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r242
1002}}}}}}
r256
1003{{{#!if ty>ab
r242
1004{{{#!if au-=1, ab+=+("1"+pd)
r346
1005}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r242
1006{{{#!if br=true
1007}}}}}}}}}
1008{{{#!if !br
r346
1009{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1010}}}}}}
r243
1011##i=11
1012{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1013{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1014{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1015}}}}}}
1016{{{#!if ty>ab
1017{{{#!if tn-=1, ab+=+("1"+pd)
1018}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1019}}}}}}{{{#!if !br
1020{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1021{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1022}}}}}}
r256
1023{{{#!if ty>ab
r243
1024{{{#!if au-=1, ab+=+("1"+pd)
r346
1025}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1026{{{#!if br=true
1027}}}}}}}}}
1028{{{#!if !br
r346
1029{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1030}}}}}}
r243
1031##i=12
1032{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1033{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1034{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1035}}}}}}
1036{{{#!if ty>ab
1037{{{#!if tn-=1, ab+=+("1"+pd)
1038}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1039}}}}}}{{{#!if !br
1040{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1041{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1042}}}}}}
r256
1043{{{#!if ty>ab
r243
1044{{{#!if au-=1, ab+=+("1"+pd)
r346
1045}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1046{{{#!if br=true
1047}}}}}}}}}
1048{{{#!if !br
r346
1049{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1050}}}}}}
r243
1051##i=13
1052{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1053{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1054{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1055}}}}}}
1056{{{#!if ty>ab
1057{{{#!if tn-=1, ab+=+("1"+pd)
1058}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1059}}}}}}{{{#!if !br
1060{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1061{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1062}}}}}}
r256
1063{{{#!if ty>ab
r243
1064{{{#!if au-=1, ab+=+("1"+pd)
r346
1065}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1066{{{#!if br=true
1067}}}}}}}}}
1068{{{#!if !br
r346
1069{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1070}}}}}}
r243
1071##i=14
1072{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1073{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1074{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1075}}}}}}
1076{{{#!if ty>ab
1077{{{#!if tn-=1, ab+=+("1"+pd)
1078}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1079}}}}}}{{{#!if !br
1080{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1081{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1082}}}}}}
r256
1083{{{#!if ty>ab
r243
1084{{{#!if au-=1, ab+=+("1"+pd)
r346
1085}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1086{{{#!if br=true
1087}}}}}}}}}
1088{{{#!if !br
r346
1089{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1090}}}}}}
r243
1091##i=15
1092{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1093{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1094{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1095}}}}}}
1096{{{#!if ty>ab
1097{{{#!if tn-=1, ab+=+("1"+pd)
1098}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1099}}}}}}{{{#!if !br
1100{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1101{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1102}}}}}}
r256
1103{{{#!if ty>ab
r243
1104{{{#!if au-=1, ab+=+("1"+pd)
r346
1105}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1106{{{#!if br=true
1107}}}}}}}}}
1108{{{#!if !br
r346
1109{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1110}}}}}}
r243
1111##i=16
1112{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1113{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1114{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1115}}}}}}
1116{{{#!if ty>ab
1117{{{#!if tn-=1, ab+=+("1"+pd)
1118}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1119}}}}}}{{{#!if !br
1120{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1121{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1122}}}}}}
r256
1123{{{#!if ty>ab
r243
1124{{{#!if au-=1, ab+=+("1"+pd)
r346
1125}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1126{{{#!if br=true
1127}}}}}}}}}
1128{{{#!if !br
r346
1129{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1130}}}}}}
r243
1131##i=17
1132{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1133{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1134{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1135}}}}}}
1136{{{#!if ty>ab
1137{{{#!if tn-=1, ab+=+("1"+pd)
1138}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1139}}}}}}{{{#!if !br
1140{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1141{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1142}}}}}}
r256
1143{{{#!if ty>ab
r243
1144{{{#!if au-=1, ab+=+("1"+pd)
r346
1145}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1146{{{#!if br=true
1147}}}}}}}}}
1148{{{#!if !br
r346
1149{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1150}}}}}}
r243
1151##i=18
1152{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1153{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1154{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1155}}}}}}
1156{{{#!if ty>ab
1157{{{#!if tn-=1, ab+=+("1"+pd)
1158}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1159}}}}}}{{{#!if !br
1160{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1161{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1162}}}}}}
r256
1163{{{#!if ty>ab
r243
1164{{{#!if au-=1, ab+=+("1"+pd)
r346
1165}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1166{{{#!if br=true
1167}}}}}}}}}
1168{{{#!if !br
r346
1169{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1170}}}}}}
r243
1171##i=19
1172{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1173{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1174{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1175}}}}}}
1176{{{#!if ty>ab
1177{{{#!if tn-=1, ab+=+("1"+pd)
1178}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1179}}}}}}{{{#!if !br
1180{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1181{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1182}}}}}}
r256
1183{{{#!if ty>ab
r243
1184{{{#!if au-=1, ab+=+("1"+pd)
r346
1185}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1186{{{#!if br=true
1187}}}}}}}}}
1188{{{#!if !br
r346
1189{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1190}}}}}}
r243
1191##i=20
1192{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1193{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1194{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1195}}}}}}
1196{{{#!if ty>ab
1197{{{#!if tn-=1, ab+=+("1"+pd)
1198}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1199}}}}}}{{{#!if !br
1200{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1201{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1202}}}}}}
r256
1203{{{#!if ty>ab
r243
1204{{{#!if au-=1, ab+=+("1"+pd)
r346
1205}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1206{{{#!if br=true
1207}}}}}}}}}
1208{{{#!if !br
r346
1209{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1210}}}}}}
r243
1211##i=21
1212{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1213{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1214{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1215}}}}}}
1216{{{#!if ty>ab
1217{{{#!if tn-=1, ab+=+("1"+pd)
1218}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1219}}}}}}{{{#!if !br
1220{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1221{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1222}}}}}}
r256
1223{{{#!if ty>ab
r243
1224{{{#!if au-=1, ab+=+("1"+pd)
r346
1225}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1226{{{#!if br=true
1227}}}}}}}}}
1228{{{#!if !br
r346
1229{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1230}}}}}}
r243
1231##i=22
1232{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1233{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1234{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1235}}}}}}
1236{{{#!if ty>ab
1237{{{#!if tn-=1, ab+=+("1"+pd)
1238}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1239}}}}}}{{{#!if !br
1240{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1241{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1242}}}}}}
r256
1243{{{#!if ty>ab
r243
1244{{{#!if au-=1, ab+=+("1"+pd)
r346
1245}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1246{{{#!if br=true
1247}}}}}}}}}
1248{{{#!if !br
r346
1249{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1250}}}}}}
r243
1251##i=23
1252{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1253{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1254{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1255}}}}}}
1256{{{#!if ty>ab
1257{{{#!if tn-=1, ab+=+("1"+pd)
1258}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1259}}}}}}{{{#!if !br
1260{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1261{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1262}}}}}}
r256
1263{{{#!if ty>ab
r243
1264{{{#!if au-=1, ab+=+("1"+pd)
r346
1265}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1266{{{#!if br=true
1267}}}}}}}}}
1268{{{#!if !br
r346
1269{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1270}}}}}}
r243
1271##i=24
1272{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1273{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1274{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1275}}}}}}
1276{{{#!if ty>ab
1277{{{#!if tn-=1, ab+=+("1"+pd)
1278}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1279}}}}}}{{{#!if !br
1280{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1281{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1282}}}}}}
r256
1283{{{#!if ty>ab
r243
1284{{{#!if au-=1, ab+=+("1"+pd)
r346
1285}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1286{{{#!if br=true
1287}}}}}}}}}
1288{{{#!if !br
r346
1289{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1290}}}}}}
r243
1291##i=25
1292{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1293{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1294{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1295}}}}}}
1296{{{#!if ty>ab
1297{{{#!if tn-=1, ab+=+("1"+pd)
1298}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1299}}}}}}{{{#!if !br
1300{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1301{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1302}}}}}}
r256
1303{{{#!if ty>ab
r243
1304{{{#!if au-=1, ab+=+("1"+pd)
r346
1305}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1306{{{#!if br=true
1307}}}}}}}}}
1308{{{#!if !br
r346
1309{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1310}}}}}}
r243
1311##i=26
1312{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1313{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1314{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1315}}}}}}
1316{{{#!if ty>ab
1317{{{#!if tn-=1, ab+=+("1"+pd)
1318}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1319}}}}}}{{{#!if !br
1320{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1321{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1322}}}}}}
r256
1323{{{#!if ty>ab
r243
1324{{{#!if au-=1, ab+=+("1"+pd)
r346
1325}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1326{{{#!if br=true
1327}}}}}}}}}
1328{{{#!if !br
r346
1329{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1330}}}}}}
r243
1331##i=27
1332{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1333{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1334{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1335}}}}}}
1336{{{#!if ty>ab
1337{{{#!if tn-=1, ab+=+("1"+pd)
1338}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1339}}}}}}{{{#!if !br
1340{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1341{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1342}}}}}}
r256
1343{{{#!if ty>ab
r243
1344{{{#!if au-=1, ab+=+("1"+pd)
r346
1345}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1346{{{#!if br=true
1347}}}}}}}}}
1348{{{#!if !br
r346
1349{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1350}}}}}}
r243
1351##i=28
1352{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1353{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1354{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1355}}}}}}
1356{{{#!if ty>ab
1357{{{#!if tn-=1, ab+=+("1"+pd)
1358}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1359}}}}}}{{{#!if !br
1360{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1361{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1362}}}}}}
r256
1363{{{#!if ty>ab
r243
1364{{{#!if au-=1, ab+=+("1"+pd)
r346
1365}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1366{{{#!if br=true
1367}}}}}}}}}
1368{{{#!if !br
r346
1369{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1370}}}}}}
r243
1371##i=29
1372{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1373{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1374{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1375}}}}}}
1376{{{#!if ty>ab
1377{{{#!if tn-=1, ab+=+("1"+pd)
1378}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1379}}}}}}{{{#!if !br
1380{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1381{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1382}}}}}}
r256
1383{{{#!if ty>ab
r243
1384{{{#!if au-=1, ab+=+("1"+pd)
r346
1385}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1386{{{#!if br=true
1387}}}}}}}}}
1388{{{#!if !br
r346
1389{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1390}}}}}}
r243
1391##i=30
1392{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1393{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1394{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1395}}}}}}
1396{{{#!if ty>ab
1397{{{#!if tn-=1, ab+=+("1"+pd)
1398}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1399}}}}}}{{{#!if !br
1400{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1401{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1402}}}}}}
r256
1403{{{#!if ty>ab
r243
1404{{{#!if au-=1, ab+=+("1"+pd)
r346
1405}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1406{{{#!if br=true
1407}}}}}}}}}
1408{{{#!if !br
r346
1409{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1410}}}}}}
r243
1411##i=31
1412{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1413{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1414{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1415}}}}}}
1416{{{#!if ty>ab
1417{{{#!if tn-=1, ab+=+("1"+pd)
1418}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1419}}}}}}{{{#!if !br
1420{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1421{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1422}}}}}}
r256
1423{{{#!if ty>ab
r243
1424{{{#!if au-=1, ab+=+("1"+pd)
r346
1425}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1426{{{#!if br=true
1427}}}}}}}}}
1428{{{#!if !br
r346
1429{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1430}}}}}}
r243
1431##i=32
1432{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1433{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1434{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1435}}}}}}
1436{{{#!if ty>ab
1437{{{#!if tn-=1, ab+=+("1"+pd)
1438}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1439}}}}}}{{{#!if !br
1440{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1441{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1442}}}}}}
r256
1443{{{#!if ty>ab
r243
1444{{{#!if au-=1, ab+=+("1"+pd)
r346
1445}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1446{{{#!if br=true
1447}}}}}}}}}
1448{{{#!if !br
r346
1449{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1450}}}}}}
r243
1451##i=33
1452{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1453{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1454{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1455}}}}}}
1456{{{#!if ty>ab
1457{{{#!if tn-=1, ab+=+("1"+pd)
1458}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1459}}}}}}{{{#!if !br
1460{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1461{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1462}}}}}}
r256
1463{{{#!if ty>ab
r243
1464{{{#!if au-=1, ab+=+("1"+pd)
r346
1465}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1466{{{#!if br=true
1467}}}}}}}}}
1468{{{#!if !br
r346
1469{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1470}}}}}}
r243
1471##i=34
1472{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1473{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1474{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1475}}}}}}
1476{{{#!if ty>ab
1477{{{#!if tn-=1, ab+=+("1"+pd)
1478}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1479}}}}}}{{{#!if !br
1480{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1481{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1482}}}}}}
r256
1483{{{#!if ty>ab
r243
1484{{{#!if au-=1, ab+=+("1"+pd)
r346
1485}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1486{{{#!if br=true
1487}}}}}}}}}
1488{{{#!if !br
r346
1489{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1490}}}}}}
r243
1491##i=35
1492{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1493{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1494{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1495}}}}}}
1496{{{#!if ty>ab
1497{{{#!if tn-=1, ab+=+("1"+pd)
1498}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1499}}}}}}{{{#!if !br
1500{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1501{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1502}}}}}}
r256
1503{{{#!if ty>ab
r243
1504{{{#!if au-=1, ab+=+("1"+pd)
r346
1505}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1506{{{#!if br=true
1507}}}}}}}}}
1508{{{#!if !br
r346
1509{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1510}}}}}}
r243
1511##i=36
1512{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1513{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1514{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1515}}}}}}
1516{{{#!if ty>ab
1517{{{#!if tn-=1, ab+=+("1"+pd)
1518}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1519}}}}}}{{{#!if !br
1520{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1521{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1522}}}}}}
r256
1523{{{#!if ty>ab
r243
1524{{{#!if au-=1, ab+=+("1"+pd)
r346
1525}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1526{{{#!if br=true
1527}}}}}}}}}
1528{{{#!if !br
r346
1529{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1530}}}}}}
r243
1531##i=37
1532{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1533{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1534{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1535}}}}}}
1536{{{#!if ty>ab
1537{{{#!if tn-=1, ab+=+("1"+pd)
1538}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1539}}}}}}{{{#!if !br
1540{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1541{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1542}}}}}}
r256
1543{{{#!if ty>ab
r243
1544{{{#!if au-=1, ab+=+("1"+pd)
r346
1545}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1546{{{#!if br=true
1547}}}}}}}}}
1548{{{#!if !br
r346
1549{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1550}}}}}}
r243
1551##i=38
1552{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1553{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1554{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1555}}}}}}
1556{{{#!if ty>ab
1557{{{#!if tn-=1, ab+=+("1"+pd)
1558}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1559}}}}}}{{{#!if !br
1560{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1561{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1562}}}}}}
r256
1563{{{#!if ty>ab
r243
1564{{{#!if au-=1, ab+=+("1"+pd)
r346
1565}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1566{{{#!if br=true
1567}}}}}}}}}
1568{{{#!if !br
r346
1569{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1570}}}}}}
r243
1571##i=39
1572{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1573{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1574{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1575}}}}}}
1576{{{#!if ty>ab
1577{{{#!if tn-=1, ab+=+("1"+pd)
1578}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1579}}}}}}{{{#!if !br
1580{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1581{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1582}}}}}}
r256
1583{{{#!if ty>ab
r243
1584{{{#!if au-=1, ab+=+("1"+pd)
r346
1585}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1586{{{#!if br=true
1587}}}}}}}}}
1588{{{#!if !br
r346
1589{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1590}}}}}}
r243
1591##i=40
1592{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1593{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1594{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1595}}}}}}
1596{{{#!if ty>ab
1597{{{#!if tn-=1, ab+=+("1"+pd)
1598}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1599}}}}}}{{{#!if !br
1600{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1601{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1602}}}}}}
r256
1603{{{#!if ty>ab
r243
1604{{{#!if au-=1, ab+=+("1"+pd)
r346
1605}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1606{{{#!if br=true
1607}}}}}}}}}
1608{{{#!if !br
r346
1609{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1610}}}}}}
r243
1611##i=41
1612{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1613{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1614{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1615}}}}}}
1616{{{#!if ty>ab
1617{{{#!if tn-=1, ab+=+("1"+pd)
1618}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1619}}}}}}{{{#!if !br
1620{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1621{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1622}}}}}}
r256
1623{{{#!if ty>ab
r243
1624{{{#!if au-=1, ab+=+("1"+pd)
r346
1625}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1626{{{#!if br=true
1627}}}}}}}}}
1628{{{#!if !br
r346
1629{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1630}}}}}}
r243
1631##i=42
1632{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1633{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1634{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1635}}}}}}
1636{{{#!if ty>ab
1637{{{#!if tn-=1, ab+=+("1"+pd)
1638}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1639}}}}}}{{{#!if !br
1640{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1641{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1642}}}}}}
r256
1643{{{#!if ty>ab
r243
1644{{{#!if au-=1, ab+=+("1"+pd)
r346
1645}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1646{{{#!if br=true
1647}}}}}}}}}
1648{{{#!if !br
r346
1649{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1650}}}}}}
r243
1651##i=43
1652{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1653{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1654{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1655}}}}}}
1656{{{#!if ty>ab
1657{{{#!if tn-=1, ab+=+("1"+pd)
1658}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1659}}}}}}{{{#!if !br
1660{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1661{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1662}}}}}}
r256
1663{{{#!if ty>ab
r243
1664{{{#!if au-=1, ab+=+("1"+pd)
r346
1665}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1666{{{#!if br=true
1667}}}}}}}}}
1668{{{#!if !br
r346
1669{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1670}}}}}}
r243
1671##i=44
1672{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1673{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1674{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1675}}}}}}
1676{{{#!if ty>ab
1677{{{#!if tn-=1, ab+=+("1"+pd)
1678}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1679}}}}}}{{{#!if !br
1680{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1681{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1682}}}}}}
r256
1683{{{#!if ty>ab
r243
1684{{{#!if au-=1, ab+=+("1"+pd)
r346
1685}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1686{{{#!if br=true
1687}}}}}}}}}
1688{{{#!if !br
r346
1689{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1690}}}}}}
r243
1691##i=45
1692{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1693{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1694{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1695}}}}}}
1696{{{#!if ty>ab
1697{{{#!if tn-=1, ab+=+("1"+pd)
1698}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1699}}}}}}{{{#!if !br
1700{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1701{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1702}}}}}}
r256
1703{{{#!if ty>ab
r243
1704{{{#!if au-=1, ab+=+("1"+pd)
r346
1705}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1706{{{#!if br=true
1707}}}}}}}}}
1708{{{#!if !br
r346
1709{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1710}}}}}}
r243
1711##i=46
1712{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1713{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1714{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1715}}}}}}
1716{{{#!if ty>ab
1717{{{#!if tn-=1, ab+=+("1"+pd)
1718}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1719}}}}}}{{{#!if !br
1720{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1721{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1722}}}}}}
r256
1723{{{#!if ty>ab
r243
1724{{{#!if au-=1, ab+=+("1"+pd)
r346
1725}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1726{{{#!if br=true
1727}}}}}}}}}
1728{{{#!if !br
r346
1729{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1730}}}}}}
r243
1731##i=47
1732{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1733{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1734{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1735}}}}}}
1736{{{#!if ty>ab
1737{{{#!if tn-=1, ab+=+("1"+pd)
1738}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1739}}}}}}{{{#!if !br
1740{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1741{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1742}}}}}}
r256
1743{{{#!if ty>ab
r243
1744{{{#!if au-=1, ab+=+("1"+pd)
r346
1745}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1746{{{#!if br=true
1747}}}}}}}}}
1748{{{#!if !br
r346
1749{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1750}}}}}}
r243
1751##i=48
1752{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1753{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1754{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1755}}}}}}
1756{{{#!if ty>ab
1757{{{#!if tn-=1, ab+=+("1"+pd)
1758}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1759}}}}}}{{{#!if !br
1760{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1761{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1762}}}}}}
r256
1763{{{#!if ty>ab
r243
1764{{{#!if au-=1, ab+=+("1"+pd)
r346
1765}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1766{{{#!if br=true
1767}}}}}}}}}
1768{{{#!if !br
r346
1769{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1770}}}}}}
r243
1771##i=49
1772{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1773{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1774{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1775}}}}}}
1776{{{#!if ty>ab
1777{{{#!if tn-=1, ab+=+("1"+pd)
1778}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1779}}}}}}{{{#!if !br
1780{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1781{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1782}}}}}}
r256
1783{{{#!if ty>ab
r243
1784{{{#!if au-=1, ab+=+("1"+pd)
r346
1785}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1786{{{#!if br=true
1787}}}}}}}}}
1788{{{#!if !br
r346
1789{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1790}}}}}}
r243
1791##i=50
1792{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1793{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1794{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1795}}}}}}
1796{{{#!if ty>ab
1797{{{#!if tn-=1, ab+=+("1"+pd)
1798}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1799}}}}}}{{{#!if !br
1800{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1801{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1802}}}}}}
r256
1803{{{#!if ty>ab
r243
1804{{{#!if au-=1, ab+=+("1"+pd)
r346
1805}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1806{{{#!if br=true
1807}}}}}}}}}
1808{{{#!if !br
r346
1809{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1810}}}}}}
r243
1811##i=51
1812{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1813{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1814{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1815}}}}}}
1816{{{#!if ty>ab
1817{{{#!if tn-=1, ab+=+("1"+pd)
1818}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1819}}}}}}{{{#!if !br
1820{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1821{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1822}}}}}}
r256
1823{{{#!if ty>ab
r243
1824{{{#!if au-=1, ab+=+("1"+pd)
r346
1825}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1826{{{#!if br=true
1827}}}}}}}}}
1828{{{#!if !br
r346
1829{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1830}}}}}}
r243
1831##i=52
1832{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1833{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1834{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1835}}}}}}
1836{{{#!if ty>ab
1837{{{#!if tn-=1, ab+=+("1"+pd)
1838}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1839}}}}}}{{{#!if !br
1840{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1841{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1842}}}}}}
r256
1843{{{#!if ty>ab
r243
1844{{{#!if au-=1, ab+=+("1"+pd)
r346
1845}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1846{{{#!if br=true
1847}}}}}}}}}
1848{{{#!if !br
r346
1849{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1850}}}}}}
r243
1851##i=53
1852{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1853{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1854{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1855}}}}}}
1856{{{#!if ty>ab
1857{{{#!if tn-=1, ab+=+("1"+pd)
1858}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1859}}}}}}{{{#!if !br
1860{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1861{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1862}}}}}}
r256
1863{{{#!if ty>ab
r243
1864{{{#!if au-=1, ab+=+("1"+pd)
r346
1865}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1866{{{#!if br=true
1867}}}}}}}}}
1868{{{#!if !br
r346
1869{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1870}}}}}}
r243
1871##i=54
1872{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1873{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1874{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1875}}}}}}
1876{{{#!if ty>ab
1877{{{#!if tn-=1, ab+=+("1"+pd)
1878}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1879}}}}}}{{{#!if !br
1880{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1881{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1882}}}}}}
r256
1883{{{#!if ty>ab
r243
1884{{{#!if au-=1, ab+=+("1"+pd)
r346
1885}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1886{{{#!if br=true
1887}}}}}}}}}
1888{{{#!if !br
r346
1889{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1890}}}}}}
r243
1891##i=55
1892{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1893{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1894{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1895}}}}}}
1896{{{#!if ty>ab
1897{{{#!if tn-=1, ab+=+("1"+pd)
1898}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1899}}}}}}{{{#!if !br
1900{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1901{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1902}}}}}}
r256
1903{{{#!if ty>ab
r243
1904{{{#!if au-=1, ab+=+("1"+pd)
r346
1905}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1906{{{#!if br=true
1907}}}}}}}}}
1908{{{#!if !br
r346
1909{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1910}}}}}}
r243
1911##i=56
1912{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1913{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1914{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1915}}}}}}
1916{{{#!if ty>ab
1917{{{#!if tn-=1, ab+=+("1"+pd)
1918}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1919}}}}}}{{{#!if !br
1920{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1921{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1922}}}}}}
r256
1923{{{#!if ty>ab
r243
1924{{{#!if au-=1, ab+=+("1"+pd)
r346
1925}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1926{{{#!if br=true
1927}}}}}}}}}
1928{{{#!if !br
r346
1929{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1930}}}}}}
r243
1931##i=57
1932{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1933{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1934{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1935}}}}}}
1936{{{#!if ty>ab
1937{{{#!if tn-=1, ab+=+("1"+pd)
1938}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1939}}}}}}{{{#!if !br
1940{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1941{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1942}}}}}}
r256
1943{{{#!if ty>ab
r243
1944{{{#!if au-=1, ab+=+("1"+pd)
r346
1945}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1946{{{#!if br=true
1947}}}}}}}}}
1948{{{#!if !br
r346
1949{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1950}}}}}}
r243
1951##i=58
1952{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1953{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1954{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1955}}}}}}
1956{{{#!if ty>ab
1957{{{#!if tn-=1, ab+=+("1"+pd)
1958}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1959}}}}}}{{{#!if !br
1960{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1961{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1962}}}}}}
r256
1963{{{#!if ty>ab
r243
1964{{{#!if au-=1, ab+=+("1"+pd)
r346
1965}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1966{{{#!if br=true
1967}}}}}}}}}
1968{{{#!if !br
r346
1969{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1970}}}}}}
r243
1971##i=59
1972{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1973{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1974{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1975}}}}}}
1976{{{#!if ty>ab
1977{{{#!if tn-=1, ab+=+("1"+pd)
1978}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1979}}}}}}{{{#!if !br
1980{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1981{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
1982}}}}}}
r256
1983{{{#!if ty>ab
r243
1984{{{#!if au-=1, ab+=+("1"+pd)
r346
1985}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
1986{{{#!if br=true
1987}}}}}}}}}
1988{{{#!if !br
r346
1989{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
1990}}}}}}
r243
1991##i=60
1992{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
1993{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
1994{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
1995}}}}}}
1996{{{#!if ty>ab
1997{{{#!if tn-=1, ab+=+("1"+pd)
1998}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
1999}}}}}}{{{#!if !br
2000{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2001{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2002}}}}}}
r256
2003{{{#!if ty>ab
r243
2004{{{#!if au-=1, ab+=+("1"+pd)
r346
2005}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2006{{{#!if br=true
2007}}}}}}}}}
2008{{{#!if !br
r346
2009{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2010}}}}}}
r243
2011##i=61
2012{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2013{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2014{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2015}}}}}}
2016{{{#!if ty>ab
2017{{{#!if tn-=1, ab+=+("1"+pd)
2018}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2019}}}}}}{{{#!if !br
2020{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2021{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2022}}}}}}
r256
2023{{{#!if ty>ab
r243
2024{{{#!if au-=1, ab+=+("1"+pd)
r346
2025}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2026{{{#!if br=true
2027}}}}}}}}}
2028{{{#!if !br
r346
2029{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2030}}}}}}
r243
2031##i=62
2032{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2033{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2034{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2035}}}}}}
2036{{{#!if ty>ab
2037{{{#!if tn-=1, ab+=+("1"+pd)
2038}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2039}}}}}}{{{#!if !br
2040{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2041{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2042}}}}}}
r256
2043{{{#!if ty>ab
r243
2044{{{#!if au-=1, ab+=+("1"+pd)
r346
2045}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2046{{{#!if br=true
2047}}}}}}}}}
2048{{{#!if !br
r346
2049{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2050}}}}}}
r243
2051##i=63
2052{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2053{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2054{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2055}}}}}}
2056{{{#!if ty>ab
2057{{{#!if tn-=1, ab+=+("1"+pd)
2058}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2059}}}}}}{{{#!if !br
2060{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2061{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2062}}}}}}
r256
2063{{{#!if ty>ab
r243
2064{{{#!if au-=1, ab+=+("1"+pd)
r346
2065}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2066{{{#!if br=true
2067}}}}}}}}}
2068{{{#!if !br
r346
2069{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2070}}}}}}
r243
2071##i=64
2072{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2073{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2074{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2075}}}}}}
2076{{{#!if ty>ab
2077{{{#!if tn-=1, ab+=+("1"+pd)
2078}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2079}}}}}}{{{#!if !br
2080{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2081{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2082}}}}}}
r256
2083{{{#!if ty>ab
r243
2084{{{#!if au-=1, ab+=+("1"+pd)
r346
2085}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2086{{{#!if br=true
2087}}}}}}}}}
2088{{{#!if !br
r346
2089{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2090}}}}}}
r243
2091##i=65
2092{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2093{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2094{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2095}}}}}}
2096{{{#!if ty>ab
2097{{{#!if tn-=1, ab+=+("1"+pd)
2098}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2099}}}}}}{{{#!if !br
2100{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2101{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2102}}}}}}
r256
2103{{{#!if ty>ab
r243
2104{{{#!if au-=1, ab+=+("1"+pd)
r346
2105}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2106{{{#!if br=true
2107}}}}}}}}}
2108{{{#!if !br
r346
2109{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2110}}}}}}
r243
2111##i=66
2112{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2113{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2114{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2115}}}}}}
2116{{{#!if ty>ab
2117{{{#!if tn-=1, ab+=+("1"+pd)
2118}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2119}}}}}}{{{#!if !br
2120{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2121{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2122}}}}}}
r256
2123{{{#!if ty>ab
r243
2124{{{#!if au-=1, ab+=+("1"+pd)
r346
2125}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2126{{{#!if br=true
2127}}}}}}}}}
2128{{{#!if !br
r346
2129{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2130}}}}}}
r243
2131##i=67
2132{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2133{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2134{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2135}}}}}}
2136{{{#!if ty>ab
2137{{{#!if tn-=1, ab+=+("1"+pd)
2138}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2139}}}}}}{{{#!if !br
2140{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2141{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2142}}}}}}
r256
2143{{{#!if ty>ab
r243
2144{{{#!if au-=1, ab+=+("1"+pd)
r346
2145}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2146{{{#!if br=true
2147}}}}}}}}}
2148{{{#!if !br
r346
2149{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2150}}}}}}
r243
2151##i=68
2152{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2153{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2154{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2155}}}}}}
2156{{{#!if ty>ab
2157{{{#!if tn-=1, ab+=+("1"+pd)
2158}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2159}}}}}}{{{#!if !br
2160{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2161{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2162}}}}}}
r256
2163{{{#!if ty>ab
r243
2164{{{#!if au-=1, ab+=+("1"+pd)
r346
2165}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2166{{{#!if br=true
2167}}}}}}}}}
2168{{{#!if !br
r346
2169{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2170}}}}}}
r243
2171##i=69
2172{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2173{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2174{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2175}}}}}}
2176{{{#!if ty>ab
2177{{{#!if tn-=1, ab+=+("1"+pd)
2178}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2179}}}}}}{{{#!if !br
2180{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2181{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2182}}}}}}
r256
2183{{{#!if ty>ab
r243
2184{{{#!if au-=1, ab+=+("1"+pd)
r346
2185}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2186{{{#!if br=true
2187}}}}}}}}}
2188{{{#!if !br
r346
2189{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2190}}}}}}
r243
2191##i=70
2192{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2193{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2194{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2195}}}}}}
2196{{{#!if ty>ab
2197{{{#!if tn-=1, ab+=+("1"+pd)
2198}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2199}}}}}}{{{#!if !br
2200{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2201{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2202}}}}}}
r256
2203{{{#!if ty>ab
r243
2204{{{#!if au-=1, ab+=+("1"+pd)
r346
2205}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2206{{{#!if br=true
2207}}}}}}}}}
2208{{{#!if !br
r346
2209{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17), ab=(ab.length<18)?(pd+ab).substr(-18):ab, au+=ab.substr(0,1), ab=ab.substr(1)+"0"
r256
2210}}}}}}
r243
2211##i=71
2212{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r346
2213{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
r349
2214{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r243
2215}}}}}}
2216{{{#!if ty>ab
2217{{{#!if tn-=1, ab+=+("1"+pd)
2218}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r346
2219}}}}}}{{{#!if !br
2220{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2221{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty,
r243
2222}}}}}}
r256
2223{{{#!if ty>ab
r243
2224{{{#!if au-=1, ab+=+("1"+pd)
r346
2225}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r243
2226{{{#!if br=true
r256
2227}}}}}}}}}
r285
2228tn을 빈 문자열로 초기화하고 변수 ts를 가져옵니다. 마지막 72회까지 몫을 구하는 계산을 했음에도 불구하고 나머지가 나누어떨어져 0이 되지 않는다면 tn을 "..."로, ts를 true로 바꿉니다.
2229{{{#!if tn="", !br
r245
2230{{{#!if tn="...", ts=true
r247
2231}}}}}}
r229
2232
r196
2233##rs 매기기
r248
2234앞에 매겼던 ac와 bc로 판별식을 만듭니다. i=ac-bc로 둡니다. a의 가장 큰 자리와 b의 가장 큰 자리가 얼마나 차이나는가에 따라 몫에 매기는 소수점 위치가 달라집니다. i>=-35 (ac==-18이고 bc==17일 경우), i<=35 (ac==17이고 bc=-18일 경우)입니다.
r264
2235{{{#!if i=ac-bc
2236}}}
r272
2237a에서 b를 나누면 몫을 10^i 의 자리부터 매기게 됩니다. 소수점 아랫부분까지 몫 기록이 이어지면 상관이 없겠으나, 몫이 소수가 아닌 정수로 기록될 때 실제 자릿수에 해당하는 길이보다 (금방 나누어떨어져) 몫이 짧게 기록되고 그치는 경우 남는 자리에 자동적으로 0을 채워주지 않게 됩니다. 이러면 수동으로 0을 채워주어야 하며, (i==0일 경우 10^0의 자리부터 몫을 기록하므로 10^1과 같거나 큰 자리부터 기록할 경우 곧) i>0일 때에만 의미가 있습니다.
2238이를테면 4000/2를 계산하는 경우 몫이 "2"까지만 기록되며 뒤에 000은 수동으로 채워주어야 합니다.
2239{{{#!if i>0
2240몫은 tm으로 기록되므로 tm의 길이를 따집니다. i가 양수이고 몫이 정수로 나누어떨어질 경우, tm의 길이가 적어도 i+1이 되게 맞춥니다.
2241{{{#!if i+1>tm.length
2242i+1보타 tm의 길이가 작은 경우 i==35인 경우를 감안하여 tm의 뒷부분을 pd+pd --더블 패드--로 채운 다음 i+1길이만큼 오려냅니다.
2243{{{#!if tm+=pd+pd, tm=tm.substr(0,i+1)
2244}}}}}}}}}
2245
r248
2246i가 18 이상 (18 이상 35 이하)이면 rs를 매길 수 있습니다. 몫을 적어놓은 문자열 tm의 0번 index에 들어가는 문자부터 i에서 18을 뺀 값의 index에 들어가는 문자까지를 rs로 두며, rs의 문자열 길이는 i-18+1 곧 i-17입니다.
r264
2247{{{#!if i>=18
r248
2248tm에서 rs를 오려낸 문자열을 tm으로 다시 둡니다.
2249{{{#!if rs=tm.substr(0,i-17), tm=tm.substr(i-17)
2250}}}}}}
r264
2251
r196
2252##ru 매기기
r284
2253ps를 먼저 false로 초기화한 다음, i>=18 이 되(어 rs를 매기)는 경우 ps를 true로 맞춥니다.
2254{{{#!if ps=false, i>=18
r264
2255{{{#!if ps=true
r248
2256}}}}}}
r264
2257ps가 true이면 문자열 tm에서 18번째 자리까지를 ru로 두고, tm에서 ru를 오려낸 문자열을 tm으로 둡니다.
2258{{{#!if ps
2259{{{#!if ru=tm.substr(0,18), tm=tm.substr(18)
2260}}}}}}
2261ps가 false이고 (i가 충분히 큰 값이 아니고) i가 0 이상 (0 이상 17 이하)인 수라면 ru를 매길 수 있으며 문자열의 길이는 i+1이 됩니다.
2262{{{#!if !ps&&(i>=0)
r261
2263{{{#!if ru=tm.substr(0,i+1), tm=tm.substr(i+1)
r248
2264}}}}}}
r196
2265
2266##rb 매기기
r264
2267i>=0이 되(어 ru를 매기)는 경우 ps를 true로 맞춥니다.
r248
2268{{{#!if i>=0
r264
2269{{{#!if ps=true
r260
2270}}}}}}
r264
2271ps가 true이면 문자열 tm에서 18번째 자리까지를 rb로 두고, tm에서 rb를 오려낸 문자열을 tm으로 둡니다.
2272{{{#!if ps
2273{{{#!if rb=tm.substr(0,18), tm=tm.substr(18)
r248
2274}}}}}}
r264
2275ps가 false이고 i가 -18 이상 (-18 이상 -1 이하)이면 rb를 매길 수 있습니다.
r266
2276이 때 몫으로 문자열의 길이는 i+18+1 곧 i+19가 되며 그 앞부분은 0으로 채워집니다.
2277몫으로 i+19개의 자리가 채워진다면, 몫 앞을 0으로 채우는 수량은 18에서 i+19를 뺀 -i-1이 됩니다.
2278이것을 substr을 이용하여 (18자리 문자열인) pd의 substr로 채워보자면
227918에서 (-i-1)을 뺀 i+19 번부터 끝까지 해당하는 문자열로 채우면 됩니다.
r292
2280{{{#!if !ps
2281{{{#!if i>=-18
r266
2282{{{#!if rb=tm.substr(0,i+19), tm=tm.substr(i+19), rb=pd.substr(i+19)+rb
r264
2283}}}}}}
r292
2284만일 i<0이고 i가 -18보다 작아 rb에 몫을 기록하지 않고 rb보다 더 아래 자리에 기록하게 된다면 rb의 18자리를 모두 0으로 채웁니다.
2285{{{#!if i<-18
2286{{{#!if rb=pd
2287}}}}}}
2288}}}
r196
2289
2290##ri 매기기
r264
2291i>=-18이 되(어 rb를 매기)는 경우 ps를 true로 맞춥니다.
r248
2292{{{#!if i>=-18
r264
2293{{{#!if ps=true
r260
2294}}}}}}
r264
2295ps가 true이면 rb와 같은 방법으로 ri를 매기고, tm을 다시 정의합니다.
2296{{{#!if ps
2297{{{#!if ri=tm.substr(0,18), tm=tm.substr(18)
r248
2298}}}}}}
r264
2299ps가 false이며 i가 -19 이하 (-36이상 -19 이하이나, i의 최소값은 -35)이면 ri를 매길 수 있습니다. rb와 같습니다.
2300{{{#!if !ps&&(i>=-36)
r266
2301{{{#!if ri=tm.substr(0,i+37), tm=tm.substr(i+37), ri=pd.substr(i+37)+ri
r264
2302}}}
2303}}}
2304
r352
2305ri까지 몫을 기록했음에도 불구하고 여전히 몫이 남는다면 ... 처리를 하고 ts를 true로 바꿉니다. 단, 나눗셈이 나누어떨어지는 식의 경우 경고 코드 2번을 반환합니다.
r273
2306{{{#!if tm.length>0
r352
2307{{{#!if tn="...", ts=true, wb=br?2:0
r273
2308}}}}}}
2309
r231
2310여기까지가 나눗셈의 계산과정입니다.
r194
2311}}}
2312
r261
2313##== 계산 결과 표시 정리하기 ==
r302
2314##=== 결과값 표시 정리하기 ===
r231
2315연산이 끝났으면 표기된 숫자를 정리합니다.
2316
r285
2317##rs, ru 정리 부분
r304
2318먼저 ru를 (곱셈연산에서 정수값으로 나올 수 있고, 나눗셈에서 몫이 1보다 작은 값이 나오는 경우같이 값을 부여하지 않았다면 초기화할 때 정의했던 정수 0인 채로 있으므로) 문자열로 바꿉니다.
r164
2319{{{#!if ru=ru.toString()
r262
2320}}}
232118자리씩 끊어 표기하므로 소수점 위 19~36번째 자리에 해당하는 rs값이 (가령 곱셈에서, 곱한 값을 더한 결과가) 0일 경우 rs를 빈 문자열로 바꿉니다. 이 때 ru를 정수로 바꿔 ru 왼쪽에 있는 0들을 지운 다음, ru를 문자열로 바꿉니다.
2322{{{#!if +rs==0
2323{{{#!if rs="", ru=+ru, ru=ru.toString()
2324}}}}}}
2325
2326계산과정에서 ru의 윗자리인 rs값이 0보다 클 경우, 1~18번째 자리인 ru에 빈 자리를 채우도록 ru의 왼쪽을 0으로 채웁니다.
2327{{{#!if +rs>0
r228
2328{{{#!if rs=rs.toString(), ru=pd+ru, ru=ru.substr(ru.length-18, 18)
r262
2329}}}
2330rs를 정수로 바꿔 rs 앞에 있는 0들을 지운 다음 rs를 문자열로 바꿉니다.
2331{{{#!if rs=+rs, rs=rs.toString()
r171
2332}}}}}}
r156
2333
r285
2334##rb, ri 정리 부분
r287
2335i보다 소수점 아래부분을 더 써내려가야 하는 상황이 아닌(나눗셈에서 ts가 false인) 경우에서, 소수점 아래 19~36번째 자리에 해당하는 ri값이 0일 경우 ri를 빈 문자열로 바꿉니다.
r179
2336이 때 ri와 rb가 모두 0일 경우 rb도 빈 문자열로 바꾸고 rp=0으로 둡니다.
r285
2337{{{#!if !ts
r273
2338{{{#!if +ri==0
r164
2339{{{#!if ri=""
r273
2340}}}{{{#!if +rb==0
r179
2341{{{#!if rb="", rp=0
r285
2342}}}}}}}}}}}}
r179
2343
r285
2344ri가 빈 문자열이 아닐 (+ri가 0보다 클) 때 true를 주는 논리값으로 ps를 정의합니다.
2345{{{#!if ps=(+ri>0)
2346}}}
r164
2347
r287
2348{{{#!if f=="*"
r288
2349곱셈연산에서 ri가 비어있지 않을 경우 ri와 rb를 문자열로 바꾼 다음 각각 왼쪽을 0으로 채웁니다.
2350{{{#!if ps
2351{{{#!if ri=ri.toString(), ri=pd+ri, ri=ri.substr(ri.length-18, 18), rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
2352}}}}}}
r289
2353곱셈연산에서 ri가 비어있으나 rb가 비어있지 않을 경우 rb를 문자열로 바꾼 다음 rb의 왼쪽을 0으로 채웁니다.
2354{{{#!if !ps&&(+rb>0)
r228
2355{{{#!if rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
r179
2356}}}}}}
r287
2357}}}
r179
2358
r285
2359!ts인 상황에서 ps가 true이면 rp를 ri의 길이로, 그렇지 않고 rb만 0이 아닌경우 rp를 rb의 길이로 정의합니다.
2360{{{#!if !ts
r187
2361{{{#!if ps
r189
2362{{{#!if this.rp=ri.length
r277
2363}}}
r290
2364ps가 true일 때 19~36번째 자리인 ri까지 계산하므로 rp에 18을 더해야 하지만, 문자열 정리를 하기 위해 문자열의 index 번호를 다루고자 18을 더하는 작업은 뒤로 뻅니다.
2365}}}
r277
2366
2367{{{#!if !ps&&(rb!="")
r189
2368{{{#!if this.rp=rb.length
r160
2369}}}}}}
2370
r285
2371!ts이면서 ri가 빈 문자열이 아닐 경우 ri의 오른쪽부터 붙은 "0"들을 모두 지웁니다.
r167
2372{{{#!if ps
r223
2373{{{#!if (rp>9)&&(ri.substr(rp-9,9)=="000000000")
r290
2374{{{#!if this.ri=ri.substr(0,rp-9), rp-=9
r167
2375}}}}}}
r223
2376{{{#!if (rp>4)&&(ri.substr(rp-4,4)=="0000")
r290
2377{{{#!if this.ri=ri.substr(0,rp-4), rp-=4
r167
2378}}}}}}
r223
2379{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r290
2380{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r167
2381}}}}}}
r223
2382{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r290
2383{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r167
2384}}}}}}
r223
2385{{{#!if (rp>1)&&(ri.substr(rp-1,1)=="0")
r290
2386{{{#!if this.ri=ri.substr(0,rp-1), rp-=1
2387}}}}}}
2388문자열 정리를 끝냈을 때 rp에 18을 더합니다.
2389{{{#!if rp+=18
2390}}}}}}
r62
2391
r285
2392!ts이면서 이면서 ri가 빈 문자열일 경우, rb의 오른쪽에 붙은 "0"들을 모두 지웁니다,
r168
2393{{{#!if !ps
r223
2394{{{#!if (rp>9)&&(rb.substr(rp-9,9)=="000000000")
r290
2395{{{#!if this.rb=rb.substr(0,rp-9), rp-=9
r164
2396}}}}}}
r223
2397{{{#!if (rp>4)&&(rb.substr(rp-4,4)=="0000")
r290
2398{{{#!if this.rb=rb.substr(0,rp-4), rp-=4
r164
2399}}}}}}
r223
2400{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r290
2401{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r164
2402}}}}}}
r223
2403{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r290
2404{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r164
2405}}}}}}
r223
2406{{{#!if (rp>1)&&(rb.substr(rp-1,1)=="0")
r290
2407{{{#!if this.rb=rb.substr(0,rp-1), rp-=1
r167
2408}}}}}}}}}
r285
2409}}}
r188
2410
r285
2411ts인 경우 rb, ri의 오른쪽 부분을 정리하지 않고 rp를 39로 정의합니다.
2412{{{#!if ts
2413{{{#!if rp=39
2414}}}}}}
2415
2416
2417
r164
2418rb 정리를 이것으로 종료합니다.
2419
r216
2420##== 오류 코드 ==
2421error
24221 : 오버플로
r337
24232 : 언더플로 (사용하지 않음)
24243 : 0으로 나눌 수 없음
24254 : 0으로 연산할 수 없음 (사용하지 않음)
r216
24265 : 이중 소수점 표기
24276 : 소수점 윗부분 오류
24287 : 소수점 아랫부분 오류
2429
2430warning
r352
24311 : 소수점 아래 입력한 자릿수가 너무 많음
24322 : 소수점 아래 표시하는 자릿수를 제한함 (나눗셈)
24333 : 소수점 아래 표시되는 자릿수가 너무 많음 (사용하지 않음)
r216
2434
2435##== 아래 출력 변수 설명 ==
r336
2436'''sa''' : searching a (logical); '''sb''' : searching b (logical); '''sf''' : searching f (logical);
2437'''ps''' : pass (logical);
r308
2438'''ad''' : "a" decimal point of string variable 'ma' (integer);
2439'''bd''' : "b" decimal point of string variable 'mb' (integer);
2440'''md''' : displaying mode number (string→integer); '''ms''' : message for correction (string)
r310
2441'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r306
2442'''tx''' : temporary value 1 (integer); '''ty''' : temporary value 2 (integer); '''tz''' : temporary value 3 (integer);
r336
2443'''comment''' : comment (string);
r85
2444ru는 계산결과에서 소수점 위 자리이므로, dot(.)이 나오지 않습니다.
r338
2445##== 출력 부분 ==
2446##=== 계산값 출력 (정상 출력) ===
r276
2447}}}{{{#!wiki style="font-weight: 300; font-size: 17.5px;"
r310
2448{{{#!if this.sa=(this.a!="")&&(this.a!=null), this.sb=(this.b!="")&&(this.b!=null), this.sf=(this.f=='+')||(this.f=='-')||(this.f=='*')||(this.f=='/'), this.ad=ma.indexOf("."), this.bd=mb.indexOf("."), ps=false, tm="", tn=""
r320
2449}}}{{{#!if !(sa&sb&sf)
2450{{{#!if !sa||!sb
2451변수 {{{#!if !sa
r321
2452a{{{#!if !sb
2453와 변수 }}}}}}{{{#!if !sb
r322
2454b}}}}}}{{{#!if !sf
r321
2455{{{#!if !sa&!sb
r323
2456, 그리고 }}}{{{#!if !sa^!sb
r321
2457와 }}}연산자 f}}}를 입력하세요...}}}{{{#!if sa&&sb&&sf
r112
2458{{{#!if (ea==0)&&(eb==0)
r77
2459{{{#!if as[0]!=45
r48
2460@a@}}}{{{#!if as[0]==45
r110
2461(@a@)}}} {{{#!if as.length>=20
r307
2462[br]}}}@f@ {{{#!if bs[0]!=45
r48
2463@b@}}}{{{#!if bs[0]==45
r310
2464(@b@)}}} {{{#!if (ma!=as)||(mb!=bs)||(+md==3)||(+md==4)
r307
2465{{{#!if (as.length+bs.length>=30)
r308
2466[br]}}}→ {{{#!if ms=ma, ad!=-1
2467{{{#!if ms=ma.substr(0,ad)
r312
2468}}}}}}{{{#!if ps=false, ms[0]==45
r309
2469{{{#!if ms=ms.substr(1), ps=true
r311
2470}}}}}}{{{#!if (+md==3)||(+md==4)
2471{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r318
2472{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r310
2473}}}}}}{{{#!if (ty>0)&&(tz>0)
2474{{{#!if tm+=","
2475}}}}}}{{{#!if ty-->0
r316
2476{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r310
2477}}}}}}{{{#!if ty-->0
r316
2478{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2479}}}}}}{{{#!if ty-->0
r316
2480{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2481}}}}}}{{{#!if ty-->0
r316
2482{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2483}}}}}}{{{#!if ty-->0
r316
2484{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2485}}}}}}{{{#!if ty-->0
r316
2486{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r311
2487}}}}}}{{{#!if ms=tm
r314
2488}}}}}}{{{#!if ps
2489(-}}}@ms@{{{#!if ad!=-1
2490{{{#!if ms=ma.substr(ad+1)
2491}}}{{{#!if (+md==3)||(+md==4)
r316
2492{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
2493{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2494}}}}}}{{{#!if ty-->0
r316
2495{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2496}}}}}}{{{#!if ty-->0
r316
2497{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2498}}}}}}{{{#!if ty-->0
r316
2499{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2500}}}}}}{{{#!if ty-->0
r316
2501{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2502}}}}}}{{{#!if ms=tm
r315
2503}}}}}}.@ms@}}}{{{#!if ps
r317
2504)}}} @f@ {{{#!if tm="", tn="", ms=mb, bd!=-1
r308
2505{{{#!if ms=mb.substr(0,bd)
r312
2506}}}}}}{{{#!if ps=false, ms[0]==45
r310
2507{{{#!if ms=ms.substr(1), ps=true
r311
2508}}}}}}{{{#!if (+md==3)||(+md==4)
2509{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r318
2510{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r310
2511}}}}}}{{{#!if (ty>0)&&(tz>0)
2512{{{#!if tm+=","
2513}}}}}}{{{#!if ty-->0
r316
2514{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r310
2515}}}}}}{{{#!if ty-->0
r316
2516{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2517}}}}}}{{{#!if ty-->0
r316
2518{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2519}}}}}}{{{#!if ty-->0
r316
2520{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2521}}}}}}{{{#!if ty-->0
r316
2522{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
2523}}}}}}{{{#!if ty-->0
r316
2524{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r311
2525}}}}}}{{{#!if ms=tm
r314
2526}}}}}}{{{#!if ps
2527(-}}}@ms@{{{#!if bd!=-1
2528{{{#!if ms=mb.substr(bd+1)
2529}}}{{{#!if (+md==3)||(+md==4)
r316
2530{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
2531{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2532}}}}}}{{{#!if ty-->0
r316
2533{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2534}}}}}}{{{#!if ty-->0
r316
2535{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2536}}}}}}{{{#!if ty-->0
r316
2537{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2538}}}}}}{{{#!if ty-->0
r316
2539{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
2540}}}}}}{{{#!if ms=tm
r315
2541}}}}}}.@ms@}}}{{{#!if ps
r314
2542)}}} }}}{{{#!if (bs.length>=20)||(as.length+bs.length>=30)
r329
2543[br]}}}= @ns@{{{#!if comment="rs 표시 부분", ms=rs, tx=6%(+md), tm="", tn="", (+md==3)||(+md==4)
r331
2544{{{#!if comment="18자리를 md 자리만큼 떼었을 때 +md==4와 같이 모자라는 자릿수를 tx로 정의합니다.", tn=ms, ty=ms.length, tz=(ty-tx<0)?ty:(ty+tx)%(+md), ty=(ty+tx)/(+md), tz>0
r330
2545{{{#!if tm+=tn.substr(0,tz), tn=tn.substr(tz), ty>0
2546{{{#!if tm+=","
r331
2547}}}}}}}}}{{{#!if ty-->0
2548{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
2549}}}}}}{{{#!if ty-->0
2550{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2551}}}}}}{{{#!if ty-->0
2552{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2553}}}}}}{{{#!if ty-->0
2554{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2555}}}}}}{{{#!if ty-->0
2556{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2557}}}}}}{{{#!if ty-->0
2558{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r332
2559}}}}}}{{{#!if ms=tm
r334
2560}}}}}}@ms@{{{#!if comment="rs의 값이 존재하고 끊는 단위로 떨어질 때 자릿수 구분 기호인 반점을 새깁니다.", ms=((rs!="")&&(18%(+md)==0))?",":""
r333
2561}}}@ms@{{{#!if comment="ru 표시 부분", ms=ru, tm="", tn="", (+md==3)||(+md==4)
2562{{{#!if tn=ms, ty=ms.length, tz=ty%(+md), ty=ty/(+md), tz>0
2563{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
2564}}}}}}{{{#!if (ty>0)&&(tz>0)
2565{{{#!if tm+=","
2566}}}}}}{{{#!if ty-->0
2567{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
2568}}}}}}{{{#!if ty-->0
2569{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2570}}}}}}{{{#!if ty-->0
2571{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2572}}}}}}{{{#!if ty-->0
2573{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2574}}}}}}{{{#!if ty-->0
2575{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2576}}}}}}{{{#!if ty-->0
2577{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2578}}}}}}{{{#!if ms=tm
2579}}}}}}@ms@{{{#!if +rp>0
r98
2580##rb string, decimal point marking
r333
2581.{{{#!if comment="rb 표시 부분", ms=rb, tm="", tn="", (+md==3)||(+md==4)
2582{{{#!if tn=ms, ty=ms.length, ty=ty/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
2583{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2584}}}}}}{{{#!if ty-->0
2585{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2586}}}}}}{{{#!if ty-->0
2587{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2588}}}}}}{{{#!if ty-->0
2589{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2590}}}}}}{{{#!if ty-->0
2591{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2592}}}}}}{{{#!if ms=tm
2593}}}}}}@ms@{{{#!if ri!=""
r334
2594{{{#!if comment="ri의 값이 존재하고 끊는 단위로 떨어질 때 자릿수를 매기고자 띄어쓰기를 넣습니다.", ms=(18%(+md)==0)?" ":""
r333
2595}}}@ms@{{{#!if comment="ri 표시 부분", ms=ri, tm="", tn="", (+md==3)||(+md==4)
r359
2596{{{#!if comment="rs의 경우와 같이, md만큼 떼었을 때 rb에서 모자라는 자릿수를 먼저 끊어 표시합니다.", tn=ms, ty=ms.length, ty=(ty+tx-1)/(+md), tm=(tx>0)?tn.substr(0,tx):tn.substr(0,+md), tn=(tx>0)?tn.substr(tx):tn.substr(+md), ty>0
r335
2597{{{#!if tm+=" "
2598}}}}}}{{{#!if ty-->0
2599{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
2600}}}}}}{{{#!if ty-->0
r333
2601{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2602}}}}}}{{{#!if ty-->0
2603{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2604}}}}}}{{{#!if ty-->0
2605{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2606}}}}}}{{{#!if ty-->0
2607{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2608}}}}}}{{{#!if ty-->0
2609{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2610}}}}}}{{{#!if ms=tm
r339
2611}}}}}}@ms@{{{#!if (f=='/')&&ts
r340
2612...}}}}}}}}}}}}}}}{{{#!if (ea>0)||(eb>0)
r338
2613##=== 오류 · 경고 코드 출력 부분 ===
r112
2614{{{#!if (ea==1)||(eb==1)
r192
2615'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==1
r112
2616a{{{#!if eb==1
2617와 }}}}}}{{{#!if eb==1
r298
2618b}}}에 범위를 초과하는 값이 입력되었습니다. {{{#gray (오버플로)}}}{{{#!if ea!=eb
2619[br]}}}}}}{{{#!if eb==3
2620'''{{{#orangered [오류]}}}''' 0으로 나눌 수 없습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
2621[br]}}}}}}{{{#!if (ea==5)||(eb==5)
r216
2622'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==5
2623a{{{#!if eb==5
2624와 }}}}}}{{{#!if eb==5
r298
2625b}}}에 소수점이 2개 이상 입력되었습니다. {{{#gray (입력 오류)}}}}}}{{{#!if (ea==6)||(eb==6)
r216
2626'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==6
2627a의 소수점 윗자리{{{#!if eb==6
2628와 }}}}}}{{{#!if eb==6
r280
2629b의 소수점 윗자리}}}에 올바르지 않은 문구{{{#!if ps=(((ea==6)&&(eb==7))||((ea==7)&&(eb==6))), ps
r279
2630가, }}}{{{#!if !ps
r298
2631가 입력되었습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
2632[br]}}}}}}}}}{{{#!if (ea==7)||(eb==7)
r279
2633{{{#!if !ps
2634'''{{{#orangered [오류]}}}'''}}} 변수 {{{#!if ea==7
r216
2635a의 소수점 아랫자리{{{#!if eb==7
2636와 }}}}}}{{{#!if eb==7
r299
2637b의 소수점 아랫자리}}}에 올바르지 않은 문구가 입력되었습니다. {{{#gray (입력 오류)}}}}}}}}}{{{#!if ((wa>0)||(wb>0))&&(((ea==0)&&(eb==0))||((wb==1)&&(eb==3)))
r300
2638{{{#!if (eb!=3)||((ea>3)&&(eb==3))
r298
2639[br]}}}{{{#!wiki style="display: inline; text-shadow: 1px 1px 2px gray;"
r352
2640'''{{{#yellow [경고] }}}'''}}}{{{#!if (wa==1)||(wb==1)
2641변수 {{{#!if (wa==1)&&(ea==0)
r301
2642a{{{#!if (wb==1)&&(ea==0)
r269
2643와 }}}}}}{{{#!if wb==1
2644b}}}의 소수점 아래에 입력한 문구가 너무 많습니다. 소수점 아래 19번째 자리부터 입력된 문구는 무시됩니다.
r352
2645}}}{{{#!if wb==2
2646나누어 떨어지는 식이지만 소수점 아래 표시되는 자릿수가 너무 많아 표시를 제한합니다.}}}}}}}}}[include(틀:계산기/설명문서)][include(틀:편집기 열기, 문서명=틀:계산기2)]