r361
r307
1[[분류:냥]][[분류:계산용 틀]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:구 계산기2)][Include(틀:상세 내용, 설명대상=떼어낸 계산기, 문서명=틀\:계산기/구버전)]{{{#!wiki style="display: none;"
r136
2##디버그용 if 문법 ("문자열" 값으로 정의해야 합니다.)
r340
3{{{#!if a= ,b= ,f=, md=
r191
4}}}
r218
5##== 변수 설명 ==
r55
6'''as''' : "a" value to string; '''bs''' : "b" value to string;
r56
7'''al''' : "a" string length (integer); '''bl''' : "b" string length (integer)
8'''ad''' : "a" decimal point (integer); '''bd''' : "b" decimal point (integer);
9'''au''' : --gold-- "a" upper value (string→integer); '''bu''' : "b" upper value (string→integer);
10'''ab''' : "a" below value (string→integer); '''bb''' : "b" below value (string→integer);
r211
11'''ap''' : "a" # of places of decimal (for addition or subtraction);
r216
12'''ac''' : a '''c'''onstant of "a" for division (integer);
r211
13'''bp''' : "b" # of places of decimal (for addition or subtraction);
r216
14'''bc''' : a '''c'''onstant of "b" for division (integer);
r55
150.303과 0.0303은 다른 수이므로 자리수가 다름을 표시할 용도
r78
16'''ru''' : "result" upper value (integer→string); '''rb''' : "result" below value (integer→string);
17'''rp''' : "result" # of places of decimal (integer);
r124
18'''rs''' : "result" suprerior value (integer→string); '''ri''' : "result" inferior value (integer→string);
r218
19'''i''' : index;
20'''tu''' : temporary value 1 (integer); '''tv''' : temporary value 2 (integer);
r244
21'''tw''' : temporary value 3 (integer); '''tx''' : temporary value 4 (integer→string);
22'''ty''' : temporary value 5 (integer); '''tz''' : temporary value 6 (integer);
r237
23'''pd''' : padding with zeros. (string)
r217
24'''ps''' : pass (logical); '''ts''' : --not about gender-- test (logical) ; '''br''' : break (logical);
r218
25'''ea''' : error code about "a" (integer); '''eb''' : error code about "b" (integer);
26'''wa''' : warning code about "a" (integer); '''wb''' : warning code about "b" (integer);
27'''ma''' : message about "a" (string); '''mb''' : message about "b" (string);
28'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r165
29'''ns''' : negative sign for multiplication and division (string);
r218
30
31##== 초기화 ==
32값을 미리 정의하여 초기화합니다. 중간에 --장난으로-- 계산에 사용되는 변수에 값을 부여한 채로 include 하더라도 이를 무시합니다.
r318
33{{{#!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"
r142
34}}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".")
r53
35}}}{{{#!if ad!=-1
r133
36소수점이 발견되는 자리 번호가 ad이므로 ad+1번에 해당되는 자리부터 끝까지 표기합니다.
r98

(r96으로 되돌림)
37{{{#!if this.au=as.substr(0,ad), this.ab=as.substr(ad+1, al-ad-1), this.ap=ab.length
r64
38}}}{{{#!if (au=="")||(au=="-")||(au=="+")
r132
39.12345 식으로 또는 -.12345 식으로 기입할 경우 upper 값을 0으로 부여합니다.
r62
40{{{#!if au="0"
r56
41}}}}}}}}}{{{#!if ad==-1
r133
42소수점이 존재하지 않을 경우 au 문자열 길이값을 ad로 정의합니다. au의 마지막 문자열 index는 ad-1이 됩니다.
r132
43{{{#!if this.au=as, ab="", ap=0+0, ad=au.length
r53
44}}}}}}{{{#!if bd!=-1
r99
45{{{#!if this.bu=bs.substr(0,bd), this.bb=bs.substr(bd+1, bl-bd-1), this.bp=bb.length
r64
46}}}{{{#!if (bu=="")||(bu=="-")||(bu=="+")
r62
47{{{#!if bu="0"
r53
48}}}}}}}}}{{{#!if bd==-1
r132
49{{{#!if this.bu=bs, bb="", bp=0+0, bd=bu.length
r51
50}}}}}}
r59
51
r216
52##== 유효성 검사 ==
r221
53the seed에서 지원되는 long(integer)가 unsigned였으면 1844경까지 가서 충분히 19자리로 놀 수 있었는데, signed long이므로 922경까지 가능한 공간에서 18자리로 잘라내기를 합니다. (소수점 위 최대 18자리, 소수점 아래 최대 18자리)
r60
54
r216
55(반점(,)을 자동적으로 생략하고 들어가는 것은 나중에 생각하겠습니다.)
r221
56
r227
57{{{#!if (as!=null)&&(bs!=null)
58a와 b 모두 입력되었을 때, br와 ts 변수를 이용하여 순차적으로 검사를 진행합니다. 도중 문제가 있으면 (br를 true로 반환하고) 오류 코드를 내도록 만듭니다. a를 먼저 보며, 소수점 윗부분을 먼저 본 다음 소수점 아랫부분을 봅니다.
r220
59변수 tm와 tn을 가져와 유효성 검사를 실행합니다.
60먼저 소수점을 2개 이상 입력했음이 탐지된다면 오류코드 5번(이중 소수점 표기)을 반환합니다.
61소수점을 입력하면 indexOf와 lastIndexOf는 서로 다른 값을 가리키게 됩니다. 소수점을 입력하지 않았을 경우 indexOf와 lastIndexOf는 -1로 서로 같은 값을 가리키게 됩니다.
r226
62{{{#!if ts=(as.indexOf(".")==as.lastIndexOf(".")),
r220
63}}}{{{#!if !ts&&!br
64{{{#!if br=true, ea=5
65}}}}}}
r218
66
r220
67문제가 없으면 au를 tm으로 복제하고 검사를 계속 합니다.
68앞자리가 마이너스(-)일 경우 이를 잘라냅니다.
69{{{#!if ts&&!br
r224
70{{{#!if tm=au, tm[0]==45
r223
71{{{#!if tm=tm.substr(1)
r224
72}}}}}}
r218
73소수점 윗자릿수가 넘치면 오류코드 1번(오버플로)를 반환합니다.
r220
74{{{#!if ts=(tm.length<=18)
75}}}}}}
76{{{#!if !ts&&!br
r217
77{{{#!if br=true, ea=1
78}}}}}}
r218
79
r253
80의도적으로 00을 적어놓았을 수 있으므로 tm 앞에 숫자 1을 더 붙인 다음, 이를 값으로 바꾼 다음 다시 텍스트 값으로 바꾼 문자열을 tn으로 정의합니다. 중간에 숫자가 아닌 문구가 들어갔다면 숫자가 아닌 문구가 들어간 부분부터 값이 잘려 나오게 됩니다.
r220
81숫자가 아닌 문구를 섞어넣었음이 탐지될 경우 오류코드 6번(소수점 윗자리 오류)을 반환합니다. (반점(,)도 걸릴 수 있습니다.)
r217
82{{{#!if ts&&!br
r220
83{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn)
r217
84}}}}}}
r220
85{{{#!if !ts&&!br
86{{{#!if br=true, ea=6
87}}}}}}
r218
88
r220
89소수점 아래 부분을 검사합니다. 앞에서 소수점 개수를 검사했으므로 소수점 아래 부분에 점(.)이 더 이상 나올 수 없습니다.
90소수점 아래 입력한 자릿수가 19자리를 넘어가면 오류 대신 경고코드 1번(소수점 아래 자릿수 너무 많음)을 반환하고 소수점 아래 자릿수를 최대 18자리로 잘라냅니다. (이하 이상한 문구를 섞어도 이를 계산에 넣지 않게 됩니다.)
r217
91{{{#!if ts&&!br
r220
92{{{#!if ab.length>=19
93{{{#!if wa=1, ab=ab.substr(0,18), ap=18
r208
94}}}}}}
r220
95
r221
96앞에서 소수점 아래 자릿수를 18자 이하로 줄였습니다. 문자열에서 자릿수에 해당하는 index가 비어있다면 해당 문자열의 주소값은 null이 나옵니다. (예:"테스트"[3]==null) 숫자는 문자열 각 자릿수 문자열의 유니코드 값이 null이 아닌 이상 48 이상 57 이하이며, 이를 이용하여 소수점 아래 18자리에 대해 유효성 검사를 합니다.
97{{{#!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))))
r208
98}}}}}}
r220
99소수점 아래 자리에 입력한 부분이 문제가 있으면 오류코드 7번(소수점 아랫자리 오류)를 반환합니다.
r218
100{{{#!if !ts&&!br
r220
101{{{#!if br=true, ea=7
r218
102}}}}}}
103
r221
104이와 같은 방법으로 b도 bu를 tm으로 복제하는 과정을 포함하여 유효성 검사를 실행합니다. 오류코드는 동일합니다.
r222
105a와 b를 각각 진단해야 하므로 br를 false로 초기화합니다.
106{{{#!if br=false, ts=(bs.indexOf(".")==bs.lastIndexOf("."))
107}}}{{{#!if !ts&&!br
r221
108{{{#!if br=true, eb=5
109}}}}}}
110{{{#!if ts&&!br
r224
111{{{#!if tm=bu, tm[0]==45
r223
112{{{#!if tm=tm.substr(1)
r221
113}}}}}}{{{#!if ts=(tm.length<=18)
114}}}}}}{{{#!if !ts&&!br
115{{{#!if br=true, eb=1
116}}}}}}
117{{{#!if ts&&!br
118{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn)
119}}}}}}{{{#!if !ts&&!br
120{{{#!if br=true, eb=6
121}}}}}}
122{{{#!if ts&&!br
123{{{#!if bb.length>=19
124{{{#!if wb=1, bb=bb.substr(0,18), bp=18
125}}}}}}{{{#!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))))
126}}}}}}{{{#!if !ts&&!br
127{{{#!if br=true, eb=7
r227
128}}}}}}}}}
r220
129
r218
130##== 2차 초기화 ==
r313
131유효성 검사가 종료되었으면 ts와 br를 false로 초기화합니다 유효성 검사에 쓰인 tm과 tn 값을 빈 문자열 값으로 초기화합니다.
132{{{#!if tm="", tn="", ts=false, br=false
r296
133}}}
134
r218
135입력한 소수점 아래에 입력한 값을 정리합니다. 이에 따라 ap, bp값도 다시 조정됩니다.
r232
136{{{#!if (ap>9)&&(ab.substr(ap-9,9)=="000000000")
r230
137{{{#!if ab=ab.substr(0,ap-9), ap=ap-9
r218
138}}}}}}
r232
139{{{#!if (ap>4)&&(ab.substr(ap-4,4)=="0000")
r218
140{{{#!if ab=ab.substr(0,ap-4), ap=ap-4
141}}}}}}
r232
142{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r218
143{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
144}}}}}}
r232
145{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r218
146{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
147}}}}}}
r232
148{{{#!if (ap>1)&&(ab.substr(ap-1,1)=="0")
r218
149{{{#!if ab=ab.substr(0,ap-1), ap=ap-1
150}}}}}}
r232
151{{{#!if (bp>9)&&(bb.substr(bp-9,9)=="000000000")
r230
152{{{#!if bb=bb.substr(0,bp-9), bp=bp-9
r218
153}}}}}}
r232
154{{{#!if (bp>4)&&(bb.substr(bp-4,4)=="0000")
r218
155{{{#!if bb=bb.substr(0,bp-4), bp=bp-4
156}}}}}}
r232
157{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r218
158{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
159}}}}}}
r232
160{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r218
161{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
162}}}}}}
r232
163{{{#!if (bp>1)&&(bb.substr(bp-1,1)=="0")
r218
164{{{#!if bb=bb.substr(0,bp-1), bp=bp-1
165}}}}}}
r216
166
r313
167그 다음 --앞자리에 0만 여러 개 적어놓고 장난치는 사람이 있을까봐-- au를 값으로 바꾼 다음 다시 문자열로 변환하여 앞자리에 있는 0들을 모두 삭제합니다. bu도 그렇게 둡니다.
168{{{#!if au=+au, au=au.toString(), bu=+bu, bu=bu.toString()
r240
169}}}
170
r315
171이 상태의 au를 ma로 저장하고 ab가 빈 문자열이 아니라면 ab도 ma에 저장합니다. 같은 방법으로 bu, bb을 mb에 저장합니다.
172{{{#!if ma=au, (ad!=-1)&&(ab!="")
r329
173a가 소수점 윗부분이 0이 되는 음수인 경우 "-0"으로 저장된 문자열은 정수값으로 바꿀 때 0이 되므로 ma앞에 -를 붙입니다.
174{{{#!if ma+="."+ab, (+au==0)&&(as[0]==45)
175{{{#!if ma="-"+ma
176}}}}}}}}}
r315
177{{{#!if mb=bu, (bd!=-1)&&(bb!="")
r329
178{{{#!if mb+="."+bb, (+bu==0)&&(bs[0]==45)
179{{{#!if mb="-"+mb
180}}}}}}}}}
r313
181
r216
182##== 덧셈, 뺄셈 ==
r71
183덧셈과 뺄셈 계산과정을 적어봅니다.
184{{{#!if (f=="+")||(f=="-")
r81
185
186a과 b의 소수점 윗부분은 정수이므로 쉽게 계산할 수 있습니다.
187{{{#!if f=="+"
188{{{#!if ru=(+au)+(+bu)
189}}}}}}
190{{{#!if f=="-"
191{{{#!if ru=(+au)-(+bu)
192}}}}}}
r98

(r96으로 되돌림)
193
r132
194a와 b 모두가 정수이면 ap==0, bp==0이 되며, 이런 경우에는 소수점 아래 자릿수를 검산할 필요가 없습니다. a와 b 중 소수점 아래 자릿수가 있는 수가 있을 때에만 소수점 윗자리의 계산값이 얼마가 나오느냐를 보면서 소수점 아래의 자릿수를 정리하는 과정이 의미가 있습니다.
r81
195{{{#!if (ap>0)||(bp>0)
r149
196만약 소수점 아래를 계산한다면 자릿수를 똑같이 맞춰야 의미가 있으므로, 자릿수가 다른 경우 자릿수가 같게 만드는 과정을 먼저 거칩니다. 이를테면 a의 소수점 자릿수가 b의 소수점 자릿수보다 많으면 b뒤에 0을 더 추가하는 방식으로 변경합니다. b 자체가 정수여도 앞에 (소수점이 없을 경우) 이미 bb="", bp=0+0으로 초기화했으므로 동작될 것입니다.
197소수점 아래 최대 18자리까지의 수를 취급하므로 최대 18칸 차이가 나게 됩니다.
198○○○○○○○○○□□□□○○□□○ 과 같이 9칸, 4칸, 2칸, 2칸, 1칸씩 차이가 나면 그 정도를 보정하게 됩니다.
199ap>bp에서 ap-bp>0이 됩니다. ap-bp는 곧 ap가 bp보다 몇 칸만큼 더 많은지를 나타냅니다.
r168
200{{{#!if ap>bp
r237
201{{{#!if bp=ap, bb+=pd
r168
202}}}{{{#!if bb=bb.substr(0,ap)
r71
203}}}}}}
r72
204
205반대로 b의 소수점 자릿수가 많은 경우도 있습니다.
r168
206{{{#!if bp>ap
r237
207{{{#!if ap=bp, ab=ab+pd
r168
208}}}{{{#!if ab=ab.substr(0,bp)
r72
209}}}}}}
r168
210
r76
211위의 과정을 거치게 되면 소수점 아래 최대 자릿수를 똑같이 맞춘 상태에서 계산하게 되므로 ap==bp가 됩니다.
r71
212
r76
213a가 음수인 경우 소수점 아래 값은 순 숫자만 표기된 상태이므로 양수 취급으로 되지 않게 소수점 아래 값인 ab에 음수 표기를 남깁니다.
r73
214{{{#!if as[0]==45
215{{{#!if ab="-"+ab
216}}}}}}
r130
217마찬가지로 b가 음수인 경우 b의 소수점 아래 값은 음수이므로 소수점 아래 값인 bb에 음수 표기를 남깁니다. 10을 소수점 아래 자릿수만큼 제곱한 값으로 저장합니다.
r73
218{{{#!if bs[0]==45
219{{{#!if bb="-"+bb
220}}}}}}
221
r81
222이때 rb를 계산합니다.
r70
223{{{#!if f=="+"
r81
224{{{#!if rb=(+ab)+(+bb)
r70
225}}}}}}
226{{{#!if f=="-"
r81
227{{{#!if rb=(+ab)-(+bb)
r70
228}}}}}}
r80
229
r74
230소수점 아래끼리 더한 자릿수가 얼마나 되는지 보기 위해 rb를 문자열로 바꿉니다.
r92
231이 때 rb가 0이 아닐 경우에만 문자열로 변환합니다.
232{{{#!if (+rb>0)||(+rb<0)
r74
233{{{#!if this.rb=rb.toString()
234}}}
r76
235문자열로 된 rb의 길이를 rp로 정의합니다.
r74
236{{{#!if this.rp=rb.length
237}}}
r92
238}}}
r101
239
r78
240rb가 음수이면 rb의 첫번째(0번 index)의 문자열에는 마이너스(-)가 들어갑니다. 이 때는 rp를 rb의 마이너스 문자열을 세지 않은 자릿수가 되도록 앞에서 정의했던 rb.length에서 1만큼 줄여 정의합니다. ap, bp는 마이너스를 붙이기 전에 값이 고정되어 있으므로 rp처럼 줄일 필요가 없습니다.
r74
241{{{#!if rb[0]==45
r75
242{{{#!if rp=rp-1
r74
243}}}}}}
r62
244
r101
245ru값이 어떤지 보고 각 경우 rb값이 어떠한가에 따라 rb만 정리하거나 rb와 ru 모두 정리합니다.
r156
246중복 처리를 막기 위해 초기화된 ps 변수 하나를 가져옵니다.
r118
247
248소수점 아래 값의 부호와 소수점 위의 값의 부호가 서로 다른 경우 계산을 하기 위해 값을 하나 정의합니다.
249
r244
250{{{#!if tv=+(("1"+pd).substr(0,ap+1))
r169
251}}}
r118
252
r80
253Case 1 : ru가 0보다 큰 경우
r76
254ru는 정수이므로 ru가 0보다 크면 곧 ru는 1 이상의 정수이며, 1 이상이면 a+b 또는 a-b가 양수+음수 꼴이 되더라도 소수점 아래 정리를 하면 됩니다. rb를 정리하는 과정에서 ru에서 1을 빌려오거나 ru에 1이 더해질 수도 있습니다. 앞에서 rb를 string으로 바꿨으므로 +rb를 다룹니다.
r70
255{{{#!if ru>0
r80
256Case 1-1 : rb가 0 이상인 경우
r241
257{{{#!if (+rb>=0)&&!ps
r78
258rb가 소수점 아래 자릿수를 초과하여 소수점 위의 수를 계산하게 생겼다면 ap=bp인 상황에서 rp>ap가 됩니다. rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
r76
259{{{#!if rp>ap
260{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r74
261}}}}}}
r78
262rb가 소수점 아래 자릿수를 초과하지 않을 경우 rb를 다시 정의할 필요 없이 그대로 둡니다.
r76
263{{{#!if rp<=ap
r77
264}}}
r111
265{{{#!if ps=true
r78
266}}}
r111
267}}}
r78
268
r101
269Case 1-2 : rb가 음수인 경우 ru에서 1을 빌려옵니다. 1보다 작은 양수값에서 1보다 작은 양수값을 빼면 -1보다 작을 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r241
270{{{#!if (+rb<0)&&!ps
r78
271{{{#!if ru=ru-1
272}}}
r118
273소수점 아래 자릿수인 ap만큼 10을 제곱한 값(tv)을 rb에서 증가시켜 rb를 재정의합니다. 그러면 rb는 양수가 됩니다. 그리고 rb를 다시 문자열로 변환합니다.
274{{{#!if rb=tv+(+rb)
r78
275}}}{{{#!if rb=rb.toString()
276}}}
r111
277{{{#!if ps=true
278}}}}}}
r78
279정리과정을 끝냈으면 ru를 string으로 변환합니다.
280{{{#!if this.ru=ru.toString()
r76
281}}}}}}
282
r80
283Case 2 : ru가 0인 경우 ru가 0이 되면 rb의 값이 양수인지 음수인지에 따라 달라집니다.
r70
284{{{#!if ru==0
r80
285Case 2-1 : rb가 0 이상인 경우
r241
286{{{#!if (+rb>=0)&&!ps
r78
287rb가 양수이면서 rb가 자릿수를 초과한 경우 rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
288{{{#!if rp>ap
289{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r111
290}}}}}}
r337
291ru를 string으로 변환합니다.
292{{{#!if ru=ru.toString()
293}}}
294{{{#!if ps=true
295}}}}}}
r80
296Case 2-2 : rb가 음수인 경우
r241
297{{{#!if (+rb<0)&&!ps
r80
298rb가 음수이면서 rb가 자릿수를 초과한 경우 값이 0인 ru에 1을 빼야 합니다. 그리고 rb가 "-"+숫자 꼴이므로 문자열의 1번 index에 해당하는 1을 지워야 합니다. 앞에서 rb가 음수인 경우 rp는 rb의 마이너스(-)가 차지하는 자릿수를 계산하지 않은 값 곧 숫자들이 차지하는 자릿수이므로, rb를 길이가 rp-1인 숫자들로 다시 정의합니다.
r78
299{{{#!if rp>ap
r80
300{{{#!if ru=ru-1, rb=rb.substr(2, rp-1)
301}}}}}}
302rb가 자릿수를 초과하지 않은 경우 rb에서 "-"를 뺀 문자열로 rb를 다시 정의합니다.
r108
303{{{#!if rp<=ap
r81
304{{{#!if rb=rb.substr(1, rp)
r111
305}}}}}}
r337
306ru를 string으로 변환합니다.
307{{{#!if ru=ru.toString()
308}}}
r335
309만일 -0.xxxx 같이 여전히 rb<0이고 ru==0인 상태라면 rb에 생겼던 마이너스 부호를 떼어내 왼쪽으로 붙입니다. ns를 "-"으로 바꿉니다.
r336
310{{{#!if +ru==0
r335
311{{{#!if ns="-"
r334
312}}}}}}
r337
313ru가 음수이면 ru앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
314{{{#!if +ru<0
315{{{#!if ru=ru.substr(1), ns="-"
316}}}}}}
r334
317{{{#!if ps=true
318}}}}}}
r70
319}}}
r79
320
r80
321Case 3 : ru가 0보다 작은 경우. 곧 -1 이하인 음수가 되는 경우.
r70
322{{{#!if ru<0
r81
323Case 3-1 : rb가 0 이하인 경우
r241
324{{{#!if (+rb<=0)&&!ps
r81
325rb가 음수이면서 자릿수를 초과한 경우 ru에 -1을 빼고, rb의 음수기호(-)와 첫번째 숫자인 문자열 "1"을 뺀 문자열로 rb를 다시 정의합니다.
326{{{#!if rp>ap
r86
327{{{#!if rb=rb.substr(2, rp-1)
r70
328}}}
r86
329}}}
r114
330rb가 자릿수를 초과하지 않은 경우 rp는 음수기호를 제외한 숫자 자릿수이므로 rb를 음수기호만을 뺀 문자열로 다시 정의합니다. 단, rb가 0이 되면 rp==1이 되므로 rb==0인 경우는 제외합니다.
r108
331{{{#!if (rp<=ap)&&(+rb<0)
r113
332{{{#!if rb=rb.substr(1, rp)
r111
333}}}}}}{{{#!if ps=true
334}}}}}}
r88
335Case 3-2 : rb가 0보다 큰 경우. 소수점 아래 부분을 보면 -1보다 큰 음수값에서 -1보다 큰 음수값을 빼면 1보다 클 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r241
336{{{#!if (+rb>0)&&!ps
r88
337ru<=-1이므로 ru+1를 해도 최대 0이 됩니다.
338{{{#!if ru=ru+1
r80
339}}}
r118
340rb>0에서 rb은 음수(계산결과)의 음수(마이너스값이 줄어듦)이므로 rb의 자릿수인 rp만큼 10을 제곱한 값(tv)에서 rb을 '''뺀''' 값으로 rb를 재정의합니다. 그러면 rb는 양수이지만 계산결과인 음수에 맞춘 값이 됩니다. 그리고 rb를 다시 문자열로 변환합니다. 변환합니다.
341{{{#!if rb=tv-(+rb)
r88
342}}}{{{#!if rb=rb.toString()
r111
343}}}{{{#!if ps=true
344}}}}}}
r81
345정리과정을 끝냈으면 ru를 string으로 변환합니다.
346{{{#!if this.ru=ru.toString()
347}}}
r335
348-0.xxxx 같이 (ru==0인데) 연산결과가 -1보다 큰 음수로 나오는 경우가 있으므로 ru 앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
r336
349{{{#!if +ru<0
r335
350{{{#!if ru=ru.substr(1), ns="-"
r336
351}}}}}}
352{{{#!if +ru==0
353{{{#!if ns="-"
354}}}}}}
r81
355}}}
356여기까지가 소수점 아래 자릿수 숫자들의 계산과정입니다.
357}}}
r76
358
r101
359a와 b 모두 정수인 경우 ap, bp는 모두 0이 되므로 ru만을 그대로 문자열로 바꾸면 되며 소수점 아래(rb)는 표기해야 할 필요가 없으므로 rb="", (소수점 아래 자릿수)rp=0을 반환합니다.
360{{{#!if (ap==0)&&(bp==0)
361{{{#!if this.ru=ru.toString(), rb="", rp=0+0
362}}}}}}
363
r102
364rb==0인 경우 rb="", rp=0을 반환합니다.
365{{{#!if +rb==0
366{{{#!if rb="", rp=0+0
367}}}}}}
368
r106
369이제 rb=""이 아닌 경우 소수점 아래 숫자 정리를 합니다.
370rp를 rb의 문자열 길이로 다시 정의합니다.
r104
371{{{#!if rb!=""
372{{{#!if this.rp=rb.length
r110
373}}}
r104
374
r106
375+"000100"을 숫자로 바꾸면 100이 되는 문제가 있습니다. 이처럼 소수점 아래 자릿수를 연산한 결과를 문자열로 바꿨을 때 기존 소수점 아래 자릿수보다 작은 길이가 나오면 앞쪽에 0을 보충합니다.
376앞에서 ap,bp를 똑같이 맞췄으므로 ap를 가져옵니다. 자릿수가 모자랄 경우 0을 하나씩 보충합니다.
377{{{#!if rp<ap
r237
378{{{#!if rb=pd.substr(0,ap-rp)+rb
r106
379}}}}}}
380
381앞에 0을 채웠다면 이제, 소수점 아래로 나오는 숫자를 보고 마지막에서부터 0이 나오면 한 자리씩 지우는 과정을 시작합니다.
r173

(r171으로 되돌림)
382
r171
383여기까지가 덧셈 또는 뺄셈연산의 계산과정이며 과정은 이후 rb 정리 과정으로 넘어갑니다.
r174
384}}}}}}
r81
385
r268
386##== 곱셈 & 나눗셈 ==
387##=== 숫자 초기화 ===
r195
388{{{#!if (f=="*")||(f=="/")
389곱셈 및 나눗셈 연산과정을 봅니다.
r69
39018자리 숫자로 입력할 수 있는 최대 정수는 999,999,999,999,999,999입니다.
391다행히 999,999,999,999,999,999*9=8,999,999,999,999,999,991 < long 한계치 9,223,372,036,854,775,807 이라서 a*각 자릿수로 덧셈해볼 수는 있습니다.
r127
392
r313
393a 또는 b가 음수가 될 경우 as 또는 bs 문자열은 "-" 기호가 붙으므로, 이것을 이용한 조건문을 하나 만들어 a와 b 둘의 부호가 서로 다를 경우 (a만 음수이거나 b가 음수일 경우) 계산 결과에 부호를 표시할 수 있게 만듭니다.
r303
394{{{#!if (as[0]==45)^(bs[0]==45)
r166
395{{{#!if ns="-"
396}}}}}}
r133
397a 또는 b가 음수가 될 경우 소수점 윗부분 문자열인 au 또는 bu에서 마이너스(-)를 제거합니다.
398{{{#!if au[0]==45
399{{{#!if au=au.substr(1,ad-1)
400}}}}}}
401{{{#!if bu[0]==45
402{{{#!if bu=bu.substr(1,bd-1)
403}}}}}}
404
r268
405##=== 자릿수 측정 ===
406나누는 자릿수에 맞춰 결과를 표시하고자 ac, bc를 자릿수를 나타내는 값으로 정의합니다.
407먼저 au는 앞에 적어놓은 0을 제거한 문자열이므로 +au>0인 경우 ac를 au의 문자열 길이에서 1을 뺀 값으로 정의합니다.
408{{{#!if +au>0
409{{{#!if ac=au.length-1
410}}}}}}
r312
411(au, ab 둘다 0인 경우 앞에 처리하는 식이 있고, au, ab 둘 중 하나라도 0이 아닐 때) au가 0이라면 ab는 단순 정수값으로 옮겼을 때 0보다 큰 값이 나옵니다. 소수점 아래 처음으로 0이 아닌 수가 나오는 자릿수를 구한 다음 덧셈 연산에서 그 수의 역원이 되는 수를 ac로 정의합니다. 이를 구하고자 ab의 뒤에 0을 더 붙여 18자리 숫자로 만든 다음 정수로 바꾸어 구합니다.
r268
412{{{#!if +au==0
413{{{#!if ac=ab+pd, ac=ac.substr(0,18), ac=+ac, ac=ac.toString(), ac=ac.length-19
414}}}}}}
r216
415
r268
416bc도 a와 같은 방법으로 정의합니다.
417{{{#!if +bu>0
418{{{#!if bc=bu.length-1
419}}}}}}{{{#!if +bu==0
420{{{#!if bc=bb+pd, bc=bc.substr(0,18), bc=+bc, bc=bc.toString(), bc=bc.length-19
421}}}}}}
422
423##=== 0인자 처리 ===
r195
424a 또는 b값이 0이 되려면 au, ab 둘 다 0이 되거나 bu, bb 둘 다 0이 되어야 합니다. a 또는 b 값이 0일 경우 당연히 음수 부호가 표시되지 않습니다.
r182
425{{{#!if ((+au==0)&&(+ab==0))||((+bu==0)&&(+bb==0))
r199
426곱셈에서 0을 곱하면 0이 되므로, 곱셈의 경우 a 또는 b가 0이 될 때 계산 결과에 0을 반환합니다.
427{{{#!if f=="*"
r166
428{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
r140
429}}}}}}
r199
430나눗셈에서 나누는 수(b)가 0이 될 경우 오류를 반환하고 ps=true를 걸어 나눗셈 연산이 되지 않게 만듭니다.
431{{{#!if f=="/"
432{{{#!if ((+bu==0)&&(+bb==0))
433error code 03 번 : 0으로 나눌 수 없습니다.
434{{{#!if eb=03, ps=true
435}}}}}}
436나누는 수가 0이 아니면서 나눌 대상이 0이 될 경우 곱셈에서 0을 곱하는 것처럼 계산 결과에 0을 반환합니다.
437{{{#!if ((+au==0)&&(+ab==0))&&((+bu!=0)||(+bb!=0))
438{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
439}}}}}}
r233
440}}}}}}
r207
441곱셈과 나눗셈에서 a와 b 모두 0이 아닌 경우를 봅니다.
r140
442{{{#!if ((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
443
r273
444##=== 3차 초기화 ===
r212
445{{{#!if f=="*"
446곱셈계산에서 18자리씩 곱셈을 할 수 있도록 입력했던 a와 b의 문자열을 확장할 것입니다.
r207
447
r131
448a와 b 각각 소수점 윗자리와 소수점 아래자리의 문자열의 빈 공간을 0으로 채워 18자로 만듭니다.
449소수점 윗자리는 왼쪽에서 0을 채워나갑니다.
r237
450{{{#!if au = pd + au
r180
451+18자}}}{{{#!if au=au.substr(au.length-18,18)
r152
452}}}
r237
453{{{#!if bu = pd + bu
r180
454+18자}}}{{{#!if bu=bu.substr(bu.length-18,18)
r152
455}}}
r131
456
457소수점 아래자리는 오른쪽에서 0을 채웁니다. (ap, bp값은 보존됩니다.)
r237
458{{{#!if ab += pd
r152
459+18자}}}{{{#!if ab=ab.substr(0,18)
460}}}
r237
461{{{#!if bb += pd
r152
462+18자}}}{{{#!if bb=bb.substr(0,18)
r200
463}}}}}}
r212
464
465{{{#!if f=="/"
r213
466나눗셈은 소수점 위 18번째 자리부터 내려가면서 처음으로 0이 아닌 숫자가 있으면 그 숫자가 처음 숫자가 되도록 숫자를 왼쪽으로 밀어두려고 합니다. 그 다음 오른쪽을 0으로 채웁니다.
r276
467
468a에서 au가 0인 경우 18자리 au를 18자리 ab로 바꾸고 ab를 18자의 0(pd)으로 채웁니다.
469소수점 아래 자리를 매겼던 ab가 소수점 위인 au자리로 옮겨지게 되므로 정수로 바꾸었다 다시 문자열로 바꿈으로써 왼쪽에 불필요하게 붙어있는 0을 삭제합니다.
470{{{#!if +au==0
471{{{#!if au=ab, ab=pd, au=+au, au=au.toString()
472}}}}}}
473
r215
474au를 왼쪽으로 밀 경우 남게 되는 자릿수를 변수 tu로 둡니다. (후술할 아래 곱셈연산과 겹치지 않습니다.)
r237
475{{{#!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)
r212
476}}}
r276
477
478b도 a와 같은 방법으로 초기화합니다.
479{{{#!if +bu==0
480{{{#!if bu=bb, bb=pd, bu=+bu, bu=bu.toString()
481}}}}}}
r237
482{{{#!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)
r212
483}}}
r216
484
r212
485}}}
r213
486}}}
r199
487여기까지 곱셈 또는 나눗셈에서 숫자를 초기화하는 과정입니다.
r233
488}}}
r140
489
r273
490##=== 곱셈 ===
r199
491a와 b 모두 0이 아닌 경우에서 곱셈을 연산하는 과정입니다.
492{{{#!if (f=="*")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
r156
493곱셈은 18자리를 끊어서 계산합니다. 소수점 아래 18자리의 아래인 제19~36번 자리를 ri로 둡니다. 소수점 위 19~36번째 자리는 rs로 두어 ri, rb, ru, rs 순으로 계산합니다.
r213
494소수점 위 18자리, 소수점 아래 18자리인 두 수를 곱하면 해당하는 자리별로 곱셈을 할 때 최대 (18+18)**2=1296회를 곱해야 합니다.
r142
495
r154
496앞으로 있을 계산은 다음과 같습니다.
r142
497 * ri를 더했더니 ri가 19자리 숫자로 넘치면 넘친 앞의 1자리를 rb로 넘깁니다.
r154
498 * rb가 19자리로 넘쳤다면 넘친 앞의 1자리를 ru로 넘깁니다.
499 * ru가 19자리로 넘친다면 넘친 앞의 1자리를 rs로 넘깁니다.
r142
500(rs는 상용로그로 보았을 때 log a<18, log b<18 에서 log (a*b) = log a + log b < 36이므로 19자리로 넘치지 않습니다.)
501문자열로 바꾸고 문자열을 쪼갠 다음 숫자로 바꾸는 과정입니다. 이를 if로 바꾸면 다음과 같습니다.
r156
502{{{#!if false
r142
503{{{#!if ri=ri.toString(), ri.length==19
r258
504{{{#!if rb=(+rb)+(+ri.substr(0,1)), ri=(+ri.substr(1,18))
r142
505}}}}}}
506{{{#!if rb=rb.toString(), rb.length==19
r258
507{{{#!if ru=(+ru)+(+rb.substr(0,1)), rb=(+rb.substr(1,18))
r142
508}}}}}}
509{{{#!if ru=ru.toString(), ru.length==19
r258
510{{{#!if rs=(+rs)+(+ru.substr(0,1)), ru=(+ru.substr(1,18))
r142
511}}}}}}
r156
512}}}
r158
513변수 tv, tw, i, ps를 가져옵니다. tw는 0, tv는 1, i는 0, ps는 false으로 초기화 된 채로 있습니다. 연산 과정 중간중간에 마지막 자릿수를 보정하고자 10씩 곱하게 됩니다. ri에서 최대 18자리에서 1자리 수를 곱하면 19자리가 될 수 있으므로 곱셈할 때마다 19자리로 넘칠때마다 넘치는 숫자는 rb로 넘깁니다.
r160
514ri부분을 합산합니다. ab*bb 의 절반을 처리합니다. (자릿수끼리 대입했을 때 처리되는 부분이 먼저 입력한 절반이 나중에 입력하는 절반보다 더 많지만, 편의상 절반이라고 적습니다.)
r156
515## for i=0 to 17
r358
516{{{#!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
517}}}{{{#!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
518}}}{{{#!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
519}}}{{{#!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
520}}}{{{#!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
521}}}{{{#!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
522}}}{{{#!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
523}}}{{{#!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
524}}}{{{#!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
525}}}{{{#!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
526}}}{{{#!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
527}}}{{{#!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
528}}}{{{#!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
529}}}{{{#!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
530}}}{{{#!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
531}}}{{{#!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
532}}}{{{#!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
533}}}{{{#!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
r156
534}}}
r141
535
r158
536##rb
r193
537rb부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bb의 나머지 절반 + au*bb의 절반), ab*bu의 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r359
538{{{#!if i=0+0, tv=1
r158
539}}}
540##for i=0 to 17
r359
541{{{#!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)
542}}}{{{#!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
r159
543}}}
r160
544## i=1
r359
545{{{#!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)
546}}}{{{#!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
r160
547}}}
548## i=2
r359
549{{{#!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)
550}}}{{{#!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
r160
551}}}
552## i=3
r359
553{{{#!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)
554}}}{{{#!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
r160
555}}}
556## i=4
r359
557{{{#!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)
558}}}{{{#!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
r160
559}}}
560## i=5
r359
561{{{#!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)
562}}}{{{#!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
r160
563}}}
564## i=6
r359
565{{{#!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)
566}}}{{{#!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
r160
567}}}
568## i=7
r359
569{{{#!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)
570}}}{{{#!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
r160
571}}}
572## i=8
r359
573{{{#!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)
574}}}{{{#!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
r160
575}}}
576## i=9
r359
577{{{#!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)
578}}}{{{#!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
r160
579}}}
580## i=10
r359
581{{{#!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)
582}}}{{{#!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
r160
583}}}
584## i=11
r359
585{{{#!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)
586}}}{{{#!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
r160
587}}}
588## i=12
r359
589{{{#!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)
590}}}{{{#!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
r160
591}}}
592## i=13
r359
593{{{#!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)
594}}}{{{#!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
r160
595}}}
596## i=14
r359
597{{{#!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)
598}}}{{{#!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
r160
599}}}
600## i=15
r359
601{{{#!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)
602}}}{{{#!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
r160
603}}}
604## i=16
r359
605{{{#!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)
606}}}{{{#!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
r160
607}}}
608## i=17
r359
609{{{#!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)
610}}}{{{#!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
r160
611}}}
r141
612
r160
613##ru
r193
614ru부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bu의 나머지 절반 + au*bu의 절반), au*bb의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r359
615{{{#!if i=0+0, tv=1
r160
616}}}
r162
617##for i=0 to 17
r360
618{{{#!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)
r359
619}}}{{{#!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
r162
620}}}
621## i=1
r360
622{{{#!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)
r359
623}}}{{{#!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
r162
624}}}
625## i=2
r360
626{{{#!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)
r359
627}}}{{{#!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
r162
628}}}
629## i=3
r360
630{{{#!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)
r359
631}}}{{{#!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
r162
632}}}
633## i=4
r360
634{{{#!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)
r359
635}}}{{{#!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
r162
636}}}
637## i=5
r360
638{{{#!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)
r359
639}}}{{{#!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
r162
640}}}
641## i=6
r360
642{{{#!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)
r359
643}}}{{{#!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
r162
644}}}
645## i=7
r360
646{{{#!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)
r359
647}}}{{{#!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
r162
648}}}
649## i=8
r360
650{{{#!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)
r359
651}}}{{{#!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
r162
652}}}
653## i=9
r360
654{{{#!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)
r359
655}}}{{{#!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
r162
656}}}
657## i=10
r360
658{{{#!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)
r359
659}}}{{{#!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
r162
660}}}
661## i=11
r360
662{{{#!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)
r359
663}}}{{{#!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
r162
664}}}
665## i=12
r360
666{{{#!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)
r359
667}}}{{{#!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
r162
668}}}
669## i=13
r360
670{{{#!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)
r359
671}}}{{{#!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
r162
672}}}
673## i=14
r360
674{{{#!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)
r359
675}}}{{{#!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
r162
676}}}
677## i=15
r360
678{{{#!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)
r359
679}}}{{{#!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
r162
680}}}
681## i=16
r360
682{{{#!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)
r359
683}}}{{{#!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
r162
684}}}
685## i=17
r360
686{{{#!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)
r359
687}}}{{{#!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
r193
688}}}
r359
689
r163
690##rs
691rs부분을 합산합니다. au*bu의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다. 소수점 윗자리는 많아야 36자리이므로 rs에서 더 이상 넘치지 않습니다.
692{{{#!if i=0+0, tv=1, ps=false
693}}}
694##for i=0 to 17
r193
695{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
696}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
697}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
698}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
699}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
700}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
701}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
702}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
703}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
704}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r163
705}}}
r193
706{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
707}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
708}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
709}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
710}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
711}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
712}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
713}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r163
714}}}
r199
715여기까지가 곱셈에서 a*b 의 연산 과정이며 rb 정리 부분으로 넘어갑니다.
r171
716}}}
717
r270
718##=== 나눗셈 ===
r203
719a와 b 모두 0이 아닌 경우에서 나눗셈을 연산하는 과정입니다.
720{{{#!if (f=="/")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
721
722au, ab, bu, bb를 18자로 만들었으므로 36자리 정수의 나눗셈으로 봅니다.
723a/b=(au+ab)/(bu+bb)=(+(au.substr(0,18)+ab.substr(0,18)))/(+(bu.substr(0,18)+bb.substr(0,18)))와 같습니다.
r204
724
r238
725##몫 서술
726제일 높은 자리부터 내려오면서 처음으로 0이 아닌 수를 왼쪽으로 당기는 과정을 거쳤으므로 (1부터 시작하는 18자리+18자리 숫자)/(1부터 시작하는 18자리+18자리 수) 연산이 됩니다.
727
728{{{#!if ps=false
r352
729}}}ps를 false로 초기화합니다. 변수에 값을 주는 여부로 ps를 사용합니다.
r238
730
731##i=0
732{{{#!if br=false
733}}}다시 정렬된 bu, bb의 값은 바뀌지 않습니다. bu, bb로 나눈 몫만큼 au, ab에서 감소시킨 다음 au와 ab를 다시 정렬시키며, au와 ab가 모두 0이 되면 더 이상 계산하지 않도록 br를 true로 반환합니다.
r239
734그 다음 계산을 편하게 할 수 있도록 텍스트값으로 된 au, ab, bu, bb를 정수값으로 변환합니다.
r301
735{{{#!if au=+au, ab=+ab, bu=+bu, bb=+bb
r239
736}}}
r238
737
r348
738먼저 au를 bu로 나눈 몫을 tw로 정의합니다. 정수를 정수로 나누면 몫만 계산되며, 100,000,000,000,000,000 이상 999,999,999 999,999,999 이하의 한 정수를 100,000,000,000,000,000 이상의 다른 한 정수로 나눈 몫이므로 tw의 값은 최소 0 최대 9가 됩니다.
r239
739{{{#!if tw=au/bu
740}}}
741bu, bb를 각각 tw만큼 곱한 값을 tx, ty로 정의합니다.
742{{{#!if tx=bu*tw, ty=bb*tw
743}}}
r351
744이 때 ty가 19자리가 되면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더하고 아래 18자리의 값을 ty로 다시 정의합니다. tx는 19자리 숫자가 되어도 문제가 없습니다. 만일 ty가 19자리가 되지 않는다면 tx와 ty를 그대로 둡니다. 그 다음 ty를 정수로 바꿉니다.
r353
745{{{#!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
r248
746}}}
r350
747이렇게 하면 tx=bu*tw<=au가 됩니다. (bu가 au보다 크면 tw는 tw의 정의에서 값이 0이 되므로 부등호가 성립됩니다.)
748
r348
749(2.1/1.6 처럼) ty가 넘쳐 tx 값이 더해지는 경우가 있으므로 몫이 유효한 값인지 검산합니다. 만일 tx ty 가 기존 au ab을 넘게 되면 tw에서 1을 빼고, tx, ty를 다시 정의합니다. 그러나 tw가 이미 0이 되었을 경우 tw를 0으로 둡니다.
r240
750{{{#!if (tx>au)||((tx==au)&&(ty>ab))
r348
751{{{#!if tw=(tw==0)?0:tw-1, tx=bu*tw, ty=bb*tw
r240
752}}}
r349
753마찬가지로 ty가 19자리가 된다면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더합니다. 그 다음 ty를 정수로 바꿉니다.
r353
754{{{#!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
r248
755}}}
756}}}
r240
757이렇게 만들어진 tx, ty가 있으면 이를 반영합니다.
r350
758au에서 tx를, ab에서 ty를 뺍니다. 만약 ty>ab일 경우 au에서 1을 가져와 (au에서 1을 빼고) ab에 1,000,000,000,000,000,000을 더한 다음 계산합니다.
r242
759{{{#!if ty>ab
r243
760{{{#!if au-=1, ab+=+("1"+pd)
r240
761}}}}}}
r242
762{{{#!if au-=tx, ab-=ty
r350
763}}}
r262
764몫인 tw를 문자열로 바꾸고 tm의 오른쪽에 더합니다.
765{{{#!if tw=tw.toString(), tm+=tw
766}}}
r250
767au, ab에서 몫을 빼고 나니 au, ab가 모두 0으로 된다면 더 이상 계산을 하지 않아야 하므로 br를 true로 반환합니다.
768{{{#!if (au==0)&&(ab==0)
r242
769{{{#!if br=true
770}}}}}}
r250
771어느 하나가 0이 되지 않는다면 br는 여전히 false이므로 !br일 때 자릿수를 옮깁니다.
772{{{#!if !br
r242
773au, ab를 문자열로 다시 바꿉니다.
774{{{#!if au=au.toString(), ab=ab.toString()
775}}}
r354
776au가 여전히 18자리 숫자일 경우 au의 첫번째 자리를 분리해 내어 tn으로 정의하고 나머지 17자리를 au로 둡니다. 그렇지 않을 경우 (au가 17자리 미만의 숫자가 되었다면) tn은 빈 문자열으로 두고 au의 왼쪽을 0(pd)으로 채운 다음 (적어도 19자리가 되는 문자열을) 뒤에서 17번째 자리부터 가지고 와 au로 만듭니다.
777{{{#!if ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17)
r351
778}}}
r243
779ab가 18자리 미만의 숫자가 되었다면 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
r351
780{{{#!if ab=(ab.length<18)?(pd+ab).substr(-18):ab
781}}}
r243
782au의 뒤로 ab의 처음 자리를 끌어옵니다.
783{{{#!if au+=ab.substr(0,1)
r242
784}}}
r243
785ab의 나머지 17자리를 앞으로 당긴 다음 "0"을 더합니다.
r354
786{{{#!if ab=ab.substr(1)+"0"
r250
787}}}
788여기까지가 자릿수를 한 칸씩 옮기는 과정입니다.
789}}}
r243
790##i=1 part 1
r248
791몫으로 기록할 숫자의 첫번째 자리를 구했다면, 그 다음 자리의 숫자를 찾기 위해 (변수 tn으로 만들 수 있는 여분의 1자리 +) 18자리 + 18자리 숫자를 18자리+18자리 숫자로 나누는 계산을 합니다. tn이 9가 될 경우 9로 시작하는 19자리 숫자를 long integer로 모두 표현할 수 없으므로 10**18 자리부터 먼저 계산합니다. 10**18의 1번째 숫자의 몫을 구한 다음 나머지를 18자리 숫자에 더하는 과정(part 1)을 거친 다음 그 18자리에서 몫을 구하는 과정(part 2)을 거칩니다.
r244
792
r249
793au와 ab를 정수로 다시 바꾸고 tz를 0으로 초기화합니다. 그리고 tn이 빈 문자열이 아니라면 (앞에 au에서 한 자리 수를 떼온 것이므로) tn에 0을 더하여 19자리로 만들고 몫을 구합니다.
r355
794{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r248
795tn을 19자리 정수로 바꿉니다.
r352
796{{{#!if tn+=pd, tn=+tn
r244
797}}}
798tz를 몫으로 정의합니다. 앞의 tw를 처리하는 방법과 같습니다. tn을 정수로 만들었으므로 소수점 아래를 비교한다면 정수의 소수점 아래에 해당하는 0과 비교합니다.
r352
799{{{#!if tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString()
r248
800}}}
r352
801마찬가지로 ty가 19자리 숫자이면 1자리를 떼어 tx에 더합니다.
r353
802{{{#!if ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r352
803}}}
804앞의 tw를 처리할 때 au와 tx를 비교한 것처럼 tz를 처리할 때 tn와 tx를 비교합니다.
r244
805{{{#!if (tx>tn)||((tx==tn)&&(ty>0))
r352
806{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz
r353
807}}}{{{#!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
r248
808}}}}}}
r247
809tn에서 나누어떨어지는 값을 뺀 나머지를 반영하여 au, ab에 더합니다. 소수점 아래 부분인 ab보다 ty가 크다면 tn에서 1을 빼어 계산합니다.
r246
810{{{#!if ty>ab
811{{{#!if tn-=1, ab+=+("1"+pd)
r245
812}}}}}}
r246
813{{{#!if au+=(tn-tx), ab-=ty
r243
814}}}
r246
815tn을 빈 문자열로 초기화합니다.
816{{{#!if tn=""
817}}}
818}}}
r243
819##i=1 part 2
r248
820br(0으로 나누어떨어짐) 이 걸려있으면 실행하지 않습니다. 그러므로 전체적으로 조건을 !br로 둔 다음 계산을 진행합니다.
r247
821{{{#!if !br
r353
822tw, tx, ty를 정의하고 처리하는 과정은 앞자리에서 몫을 찾는 과정과 동일합니다. 앞의 part 1에서 이미 au, ab를 정수로 만들었으므로 여기에 au, ab를 정수로 만드는 처리를 할 필요가 없습니다.
r354
823{{{#!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
824}}}
r249
825ty를 정수로 바꾸는 과정을 아래 if 조건문으로 병합합니다.
826{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
r354
827{{{#!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
r249
828}}}}}}
r262
829{{{#!if ty>ab
r249
830{{{#!if au-=1, ab+=+("1"+pd)
831}}}}}}{{{#!if au-=tx, ab-=ty
r353
832}}}
r263
833앞에서 계산된 tz의 값을 tw에 더한 다음 tw를 문자열로 바꿉니다. 그리고 tm에 문자열로 바꾼 tw을 더합니다.
r262
834{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
835}}}
r290
836au와 ab가 모두 0이 될 때 br를 true로 정의합니다.
r250
837{{{#!if (au==0)&&(ab==0)
838{{{#!if br=true
r249
839}}}}}}}}}
840어느 자릿수부터 br가 true로 되면 이후 자릿수 옮겨 몫을 구하는 과정이나 나머지를 정리하는 과정을 더 이상 할 필요가 없습니다.
r250
841{{{#!if !br
r249
842au, ab를 문자열로 다시 바꾸고 처리하는 과정은 동일합니다.
843{{{#!if au=au.toString(), ab=ab.toString()
r248
844}}}
r261
845ps를 au 자릿수가 18이 되었을 때 true가 되는 논리값으로 정의합니다.
r354
846{{{#!if ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17)
r248
847}}}
r354
848{{{#!if ab=(ab.length<18)?(pd+ab).substr(-18):ab
r249
849}}}
r354
850{{{#!if au+=ab.substr(0,1), ab=ab.substr(1)+"0"
851}}}}}}
r249
852##i=2
r251
853이후부터 과정은 동일합니다. 많아야 소수점 위 36자리, 소수점 아래 36자리 모두를 쓰면 72개이므로 총 72회(for i=0 to i=71)를 진행합니다.
r356
854{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
855{{{#!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))
r359
856{{{#!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
r249
857}}}}}}
858{{{#!if ty>ab
859{{{#!if tn-=1, ab+=+("1"+pd)
860}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r355
861}}}}}}{{{#!if !br
862{{{#!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))
863{{{#!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,
r250
864}}}}}}
r264
865{{{#!if ty>ab
r250
866{{{#!if au-=1, ab+=+("1"+pd)
r356
867}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r250
868{{{#!if br=true
r265
869}}}}}}}}}
r250
870{{{#!if !br
r355
871{{{#!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"
r265
872}}}}}}
r251
873##i=3
874{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
875{{{#!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))
r359
876{{{#!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
r251
877}}}}}}
878{{{#!if ty>ab
879{{{#!if tn-=1, ab+=+("1"+pd)
880}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
881}}}}}}{{{#!if !br
882{{{#!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))
883{{{#!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,
r251
884}}}}}}
r265
885{{{#!if ty>ab
r251
886{{{#!if au-=1, ab+=+("1"+pd)
r356
887}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
888{{{#!if br=true
889}}}}}}}}}
890{{{#!if !br
r356
891{{{#!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"
r265
892}}}}}}
r251
893##i=4
894{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
895{{{#!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))
r359
896{{{#!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
r251
897}}}}}}
898{{{#!if ty>ab
899{{{#!if tn-=1, ab+=+("1"+pd)
900}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
901}}}}}}{{{#!if !br
902{{{#!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))
903{{{#!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,
r251
904}}}}}}
r265
905{{{#!if ty>ab
r251
906{{{#!if au-=1, ab+=+("1"+pd)
r356
907}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
908{{{#!if br=true
909}}}}}}}}}
910{{{#!if !br
r356
911{{{#!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"
r265
912}}}}}}
r251
913##i=5
914{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
915{{{#!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))
r359
916{{{#!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
r251
917}}}}}}
918{{{#!if ty>ab
919{{{#!if tn-=1, ab+=+("1"+pd)
920}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
921}}}}}}{{{#!if !br
922{{{#!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))
923{{{#!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,
r251
924}}}}}}
r265
925{{{#!if ty>ab
r251
926{{{#!if au-=1, ab+=+("1"+pd)
r356
927}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
928{{{#!if br=true
929}}}}}}}}}
930{{{#!if !br
r356
931{{{#!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"
r265
932}}}}}}
r251
933##i=6
934{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
935{{{#!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))
r359
936{{{#!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
r251
937}}}}}}
938{{{#!if ty>ab
939{{{#!if tn-=1, ab+=+("1"+pd)
940}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
941}}}}}}{{{#!if !br
942{{{#!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))
943{{{#!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,
r251
944}}}}}}
r265
945{{{#!if ty>ab
r251
946{{{#!if au-=1, ab+=+("1"+pd)
r356
947}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
948{{{#!if br=true
949}}}}}}}}}
950{{{#!if !br
r356
951{{{#!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"
r265
952}}}}}}
r251
953##i=7
954{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
955{{{#!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))
r359
956{{{#!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
r251
957}}}}}}
958{{{#!if ty>ab
959{{{#!if tn-=1, ab+=+("1"+pd)
960}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
961}}}}}}{{{#!if !br
962{{{#!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))
963{{{#!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,
r251
964}}}}}}
r265
965{{{#!if ty>ab
r251
966{{{#!if au-=1, ab+=+("1"+pd)
r356
967}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
968{{{#!if br=true
969}}}}}}}}}
970{{{#!if !br
r356
971{{{#!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"
r265
972}}}}}}
r251
973##i=8
974{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
975{{{#!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))
r359
976{{{#!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
r251
977}}}}}}
978{{{#!if ty>ab
979{{{#!if tn-=1, ab+=+("1"+pd)
980}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
981}}}}}}{{{#!if !br
982{{{#!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))
983{{{#!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,
r251
984}}}}}}
r265
985{{{#!if ty>ab
r251
986{{{#!if au-=1, ab+=+("1"+pd)
r356
987}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
988{{{#!if br=true
989}}}}}}}}}
990{{{#!if !br
r356
991{{{#!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"
r265
992}}}}}}
r251
993##i=9
994{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
995{{{#!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))
r359
996{{{#!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
r251
997}}}}}}
998{{{#!if ty>ab
999{{{#!if tn-=1, ab+=+("1"+pd)
1000}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1001}}}}}}{{{#!if !br
1002{{{#!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))
1003{{{#!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,
r251
1004}}}}}}
r265
1005{{{#!if ty>ab
r251
1006{{{#!if au-=1, ab+=+("1"+pd)
r356
1007}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
1008{{{#!if br=true
1009}}}}}}}}}
1010{{{#!if !br
r356
1011{{{#!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"
r265
1012}}}}}}
r251
1013##i=10
1014{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1015{{{#!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))
r359
1016{{{#!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
r251
1017}}}}}}
1018{{{#!if ty>ab
1019{{{#!if tn-=1, ab+=+("1"+pd)
1020}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1021}}}}}}{{{#!if !br
1022{{{#!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))
1023{{{#!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,
r251
1024}}}}}}
r265
1025{{{#!if ty>ab
r251
1026{{{#!if au-=1, ab+=+("1"+pd)
r356
1027}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r251
1028{{{#!if br=true
1029}}}}}}}}}
1030{{{#!if !br
r356
1031{{{#!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"
r265
1032}}}}}}
r252
1033##i=11
1034{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1035{{{#!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))
r359
1036{{{#!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
r252
1037}}}}}}
1038{{{#!if ty>ab
1039{{{#!if tn-=1, ab+=+("1"+pd)
1040}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1041}}}}}}{{{#!if !br
1042{{{#!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))
1043{{{#!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,
r252
1044}}}}}}
r265
1045{{{#!if ty>ab
r252
1046{{{#!if au-=1, ab+=+("1"+pd)
r356
1047}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1048{{{#!if br=true
1049}}}}}}}}}
1050{{{#!if !br
r356
1051{{{#!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"
r265
1052}}}}}}
r252
1053##i=12
1054{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1055{{{#!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))
r359
1056{{{#!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
r252
1057}}}}}}
1058{{{#!if ty>ab
1059{{{#!if tn-=1, ab+=+("1"+pd)
1060}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1061}}}}}}{{{#!if !br
1062{{{#!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))
1063{{{#!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,
r252
1064}}}}}}
r265
1065{{{#!if ty>ab
r252
1066{{{#!if au-=1, ab+=+("1"+pd)
r356
1067}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1068{{{#!if br=true
1069}}}}}}}}}
1070{{{#!if !br
r356
1071{{{#!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"
r265
1072}}}}}}
r252
1073##i=13
1074{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1075{{{#!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))
r359
1076{{{#!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
r252
1077}}}}}}
1078{{{#!if ty>ab
1079{{{#!if tn-=1, ab+=+("1"+pd)
1080}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1081}}}}}}{{{#!if !br
1082{{{#!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))
1083{{{#!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,
r252
1084}}}}}}
r265
1085{{{#!if ty>ab
r252
1086{{{#!if au-=1, ab+=+("1"+pd)
r356
1087}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1088{{{#!if br=true
1089}}}}}}}}}
1090{{{#!if !br
r356
1091{{{#!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"
r265
1092}}}}}}
r252
1093##i=14
1094{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1095{{{#!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))
r359
1096{{{#!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
r252
1097}}}}}}
1098{{{#!if ty>ab
1099{{{#!if tn-=1, ab+=+("1"+pd)
1100}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1101}}}}}}{{{#!if !br
1102{{{#!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))
1103{{{#!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,
r252
1104}}}}}}
r265
1105{{{#!if ty>ab
r252
1106{{{#!if au-=1, ab+=+("1"+pd)
r356
1107}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1108{{{#!if br=true
1109}}}}}}}}}
1110{{{#!if !br
r356
1111{{{#!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"
r265
1112}}}}}}
r252
1113##i=15
1114{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1115{{{#!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))
r359
1116{{{#!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
r252
1117}}}}}}
1118{{{#!if ty>ab
1119{{{#!if tn-=1, ab+=+("1"+pd)
1120}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1121}}}}}}{{{#!if !br
1122{{{#!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))
1123{{{#!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,
r252
1124}}}}}}
r265
1125{{{#!if ty>ab
r252
1126{{{#!if au-=1, ab+=+("1"+pd)
r356
1127}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1128{{{#!if br=true
1129}}}}}}}}}
1130{{{#!if !br
r356
1131{{{#!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"
r265
1132}}}}}}
r252
1133##i=16
1134{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1135{{{#!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))
r359
1136{{{#!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
r252
1137}}}}}}
1138{{{#!if ty>ab
1139{{{#!if tn-=1, ab+=+("1"+pd)
1140}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1141}}}}}}{{{#!if !br
1142{{{#!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))
1143{{{#!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,
r252
1144}}}}}}
r265
1145{{{#!if ty>ab
r252
1146{{{#!if au-=1, ab+=+("1"+pd)
r356
1147}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1148{{{#!if br=true
1149}}}}}}}}}
1150{{{#!if !br
r356
1151{{{#!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"
r265
1152}}}}}}
r252
1153##i=17
1154{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1155{{{#!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))
r359
1156{{{#!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
r252
1157}}}}}}
1158{{{#!if ty>ab
1159{{{#!if tn-=1, ab+=+("1"+pd)
1160}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1161}}}}}}{{{#!if !br
1162{{{#!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))
1163{{{#!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,
r252
1164}}}}}}
r265
1165{{{#!if ty>ab
r252
1166{{{#!if au-=1, ab+=+("1"+pd)
r356
1167}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1168{{{#!if br=true
1169}}}}}}}}}
1170{{{#!if !br
r356
1171{{{#!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"
r265
1172}}}}}}
r252
1173##i=18
1174{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1175{{{#!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))
r359
1176{{{#!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
r252
1177}}}}}}
1178{{{#!if ty>ab
1179{{{#!if tn-=1, ab+=+("1"+pd)
1180}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1181}}}}}}{{{#!if !br
1182{{{#!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))
1183{{{#!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,
r252
1184}}}}}}
r265
1185{{{#!if ty>ab
r252
1186{{{#!if au-=1, ab+=+("1"+pd)
r356
1187}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1188{{{#!if br=true
1189}}}}}}}}}
1190{{{#!if !br
r356
1191{{{#!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"
r265
1192}}}}}}
r252
1193##i=19
1194{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1195{{{#!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))
r359
1196{{{#!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
r252
1197}}}}}}
1198{{{#!if ty>ab
1199{{{#!if tn-=1, ab+=+("1"+pd)
1200}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1201}}}}}}{{{#!if !br
1202{{{#!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))
1203{{{#!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,
r252
1204}}}}}}
r265
1205{{{#!if ty>ab
r252
1206{{{#!if au-=1, ab+=+("1"+pd)
r356
1207}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1208{{{#!if br=true
1209}}}}}}}}}
1210{{{#!if !br
r356
1211{{{#!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"
r265
1212}}}}}}
r252
1213##i=20
1214{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1215{{{#!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))
r359
1216{{{#!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
r252
1217}}}}}}
1218{{{#!if ty>ab
1219{{{#!if tn-=1, ab+=+("1"+pd)
1220}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1221}}}}}}{{{#!if !br
1222{{{#!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))
1223{{{#!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,
r252
1224}}}}}}
r265
1225{{{#!if ty>ab
r252
1226{{{#!if au-=1, ab+=+("1"+pd)
r356
1227}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1228{{{#!if br=true
1229}}}}}}}}}
1230{{{#!if !br
r356
1231{{{#!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"
r265
1232}}}}}}
r252
1233##i=21
1234{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1235{{{#!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))
r359
1236{{{#!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
r252
1237}}}}}}
1238{{{#!if ty>ab
1239{{{#!if tn-=1, ab+=+("1"+pd)
1240}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1241}}}}}}{{{#!if !br
1242{{{#!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))
1243{{{#!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,
r252
1244}}}}}}
r265
1245{{{#!if ty>ab
r252
1246{{{#!if au-=1, ab+=+("1"+pd)
r356
1247}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1248{{{#!if br=true
1249}}}}}}}}}
1250{{{#!if !br
r356
1251{{{#!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"
r265
1252}}}}}}
r252
1253##i=22
1254{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1255{{{#!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))
r359
1256{{{#!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
r252
1257}}}}}}
1258{{{#!if ty>ab
1259{{{#!if tn-=1, ab+=+("1"+pd)
1260}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1261}}}}}}{{{#!if !br
1262{{{#!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))
1263{{{#!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,
r252
1264}}}}}}
r265
1265{{{#!if ty>ab
r252
1266{{{#!if au-=1, ab+=+("1"+pd)
r356
1267}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1268{{{#!if br=true
1269}}}}}}}}}
1270{{{#!if !br
r356
1271{{{#!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"
r265
1272}}}}}}
r252
1273##i=23
1274{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1275{{{#!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))
r359
1276{{{#!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
r252
1277}}}}}}
1278{{{#!if ty>ab
1279{{{#!if tn-=1, ab+=+("1"+pd)
1280}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1281}}}}}}{{{#!if !br
1282{{{#!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))
1283{{{#!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,
r252
1284}}}}}}
r265
1285{{{#!if ty>ab
r252
1286{{{#!if au-=1, ab+=+("1"+pd)
r356
1287}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1288{{{#!if br=true
1289}}}}}}}}}
1290{{{#!if !br
r356
1291{{{#!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"
r265
1292}}}}}}
r252
1293##i=24
1294{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1295{{{#!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))
r359
1296{{{#!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
r252
1297}}}}}}
1298{{{#!if ty>ab
1299{{{#!if tn-=1, ab+=+("1"+pd)
1300}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1301}}}}}}{{{#!if !br
1302{{{#!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))
1303{{{#!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,
r252
1304}}}}}}
r265
1305{{{#!if ty>ab
r252
1306{{{#!if au-=1, ab+=+("1"+pd)
r356
1307}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1308{{{#!if br=true
1309}}}}}}}}}
1310{{{#!if !br
r356
1311{{{#!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"
r265
1312}}}}}}
r252
1313##i=25
1314{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1315{{{#!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))
r359
1316{{{#!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
r252
1317}}}}}}
1318{{{#!if ty>ab
1319{{{#!if tn-=1, ab+=+("1"+pd)
1320}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1321}}}}}}{{{#!if !br
1322{{{#!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))
1323{{{#!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,
r252
1324}}}}}}
r265
1325{{{#!if ty>ab
r252
1326{{{#!if au-=1, ab+=+("1"+pd)
r356
1327}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1328{{{#!if br=true
1329}}}}}}}}}
1330{{{#!if !br
r356
1331{{{#!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"
r265
1332}}}}}}
r252
1333##i=26
1334{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1335{{{#!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))
r359
1336{{{#!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
r252
1337}}}}}}
1338{{{#!if ty>ab
1339{{{#!if tn-=1, ab+=+("1"+pd)
1340}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1341}}}}}}{{{#!if !br
1342{{{#!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))
1343{{{#!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,
r252
1344}}}}}}
r265
1345{{{#!if ty>ab
r252
1346{{{#!if au-=1, ab+=+("1"+pd)
r356
1347}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1348{{{#!if br=true
1349}}}}}}}}}
1350{{{#!if !br
r356
1351{{{#!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"
r265
1352}}}}}}
r252
1353##i=27
1354{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1355{{{#!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))
r359
1356{{{#!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
r252
1357}}}}}}
1358{{{#!if ty>ab
1359{{{#!if tn-=1, ab+=+("1"+pd)
1360}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1361}}}}}}{{{#!if !br
1362{{{#!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))
1363{{{#!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,
r252
1364}}}}}}
r265
1365{{{#!if ty>ab
r252
1366{{{#!if au-=1, ab+=+("1"+pd)
r356
1367}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1368{{{#!if br=true
1369}}}}}}}}}
1370{{{#!if !br
r356
1371{{{#!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"
r265
1372}}}}}}
r252
1373##i=28
1374{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1375{{{#!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))
r359
1376{{{#!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
r252
1377}}}}}}
1378{{{#!if ty>ab
1379{{{#!if tn-=1, ab+=+("1"+pd)
1380}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1381}}}}}}{{{#!if !br
1382{{{#!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))
1383{{{#!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,
r252
1384}}}}}}
r265
1385{{{#!if ty>ab
r252
1386{{{#!if au-=1, ab+=+("1"+pd)
r356
1387}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1388{{{#!if br=true
1389}}}}}}}}}
1390{{{#!if !br
r356
1391{{{#!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"
r265
1392}}}}}}
r252
1393##i=29
1394{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1395{{{#!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))
r359
1396{{{#!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
r252
1397}}}}}}
1398{{{#!if ty>ab
1399{{{#!if tn-=1, ab+=+("1"+pd)
1400}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1401}}}}}}{{{#!if !br
1402{{{#!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))
1403{{{#!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,
r252
1404}}}}}}
r265
1405{{{#!if ty>ab
r252
1406{{{#!if au-=1, ab+=+("1"+pd)
r356
1407}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1408{{{#!if br=true
1409}}}}}}}}}
1410{{{#!if !br
r356
1411{{{#!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"
r265
1412}}}}}}
r252
1413##i=30
1414{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1415{{{#!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))
r359
1416{{{#!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
r252
1417}}}}}}
1418{{{#!if ty>ab
1419{{{#!if tn-=1, ab+=+("1"+pd)
1420}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1421}}}}}}{{{#!if !br
1422{{{#!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))
1423{{{#!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,
r252
1424}}}}}}
r265
1425{{{#!if ty>ab
r252
1426{{{#!if au-=1, ab+=+("1"+pd)
r356
1427}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1428{{{#!if br=true
1429}}}}}}}}}
1430{{{#!if !br
r356
1431{{{#!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"
r265
1432}}}}}}
r252
1433##i=31
1434{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1435{{{#!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))
r359
1436{{{#!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
r252
1437}}}}}}
1438{{{#!if ty>ab
1439{{{#!if tn-=1, ab+=+("1"+pd)
1440}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1441}}}}}}{{{#!if !br
1442{{{#!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))
1443{{{#!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,
r252
1444}}}}}}
r265
1445{{{#!if ty>ab
r252
1446{{{#!if au-=1, ab+=+("1"+pd)
r356
1447}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1448{{{#!if br=true
1449}}}}}}}}}
1450{{{#!if !br
r356
1451{{{#!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"
r265
1452}}}}}}
r252
1453##i=32
1454{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1455{{{#!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))
r359
1456{{{#!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
r252
1457}}}}}}
1458{{{#!if ty>ab
1459{{{#!if tn-=1, ab+=+("1"+pd)
1460}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1461}}}}}}{{{#!if !br
1462{{{#!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))
1463{{{#!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,
r252
1464}}}}}}
r265
1465{{{#!if ty>ab
r252
1466{{{#!if au-=1, ab+=+("1"+pd)
r356
1467}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1468{{{#!if br=true
1469}}}}}}}}}
1470{{{#!if !br
r356
1471{{{#!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"
r265
1472}}}}}}
r252
1473##i=33
1474{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1475{{{#!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))
r359
1476{{{#!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
r252
1477}}}}}}
1478{{{#!if ty>ab
1479{{{#!if tn-=1, ab+=+("1"+pd)
1480}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1481}}}}}}{{{#!if !br
1482{{{#!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))
1483{{{#!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,
r252
1484}}}}}}
r265
1485{{{#!if ty>ab
r252
1486{{{#!if au-=1, ab+=+("1"+pd)
r356
1487}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1488{{{#!if br=true
1489}}}}}}}}}
1490{{{#!if !br
r356
1491{{{#!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"
r265
1492}}}}}}
r252
1493##i=34
1494{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1495{{{#!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))
r359
1496{{{#!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
r252
1497}}}}}}
1498{{{#!if ty>ab
1499{{{#!if tn-=1, ab+=+("1"+pd)
1500}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1501}}}}}}{{{#!if !br
1502{{{#!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))
1503{{{#!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,
r252
1504}}}}}}
r265
1505{{{#!if ty>ab
r252
1506{{{#!if au-=1, ab+=+("1"+pd)
r356
1507}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1508{{{#!if br=true
1509}}}}}}}}}
1510{{{#!if !br
r356
1511{{{#!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"
r265
1512}}}}}}
r252
1513##i=35
1514{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1515{{{#!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))
r359
1516{{{#!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
r252
1517}}}}}}
1518{{{#!if ty>ab
1519{{{#!if tn-=1, ab+=+("1"+pd)
1520}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1521}}}}}}{{{#!if !br
1522{{{#!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))
1523{{{#!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,
r252
1524}}}}}}
r265
1525{{{#!if ty>ab
r252
1526{{{#!if au-=1, ab+=+("1"+pd)
r356
1527}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1528{{{#!if br=true
1529}}}}}}}}}
1530{{{#!if !br
r356
1531{{{#!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"
r265
1532}}}}}}
r252
1533##i=36
1534{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1535{{{#!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))
r359
1536{{{#!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
r252
1537}}}}}}
1538{{{#!if ty>ab
1539{{{#!if tn-=1, ab+=+("1"+pd)
1540}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1541}}}}}}{{{#!if !br
1542{{{#!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))
1543{{{#!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,
r252
1544}}}}}}
r265
1545{{{#!if ty>ab
r252
1546{{{#!if au-=1, ab+=+("1"+pd)
r356
1547}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1548{{{#!if br=true
1549}}}}}}}}}
1550{{{#!if !br
r356
1551{{{#!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"
r265
1552}}}}}}
r252
1553##i=37
1554{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1555{{{#!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))
r359
1556{{{#!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
r252
1557}}}}}}
1558{{{#!if ty>ab
1559{{{#!if tn-=1, ab+=+("1"+pd)
1560}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1561}}}}}}{{{#!if !br
1562{{{#!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))
1563{{{#!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,
r252
1564}}}}}}
r265
1565{{{#!if ty>ab
r252
1566{{{#!if au-=1, ab+=+("1"+pd)
r356
1567}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1568{{{#!if br=true
1569}}}}}}}}}
1570{{{#!if !br
r356
1571{{{#!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"
r265
1572}}}}}}
r252
1573##i=38
1574{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1575{{{#!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))
r359
1576{{{#!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
r252
1577}}}}}}
1578{{{#!if ty>ab
1579{{{#!if tn-=1, ab+=+("1"+pd)
1580}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1581}}}}}}{{{#!if !br
1582{{{#!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))
1583{{{#!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,
r252
1584}}}}}}
r265
1585{{{#!if ty>ab
r252
1586{{{#!if au-=1, ab+=+("1"+pd)
r356
1587}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1588{{{#!if br=true
1589}}}}}}}}}
1590{{{#!if !br
r356
1591{{{#!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"
r265
1592}}}}}}
r252
1593##i=39
1594{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1595{{{#!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))
r359
1596{{{#!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
r252
1597}}}}}}
1598{{{#!if ty>ab
1599{{{#!if tn-=1, ab+=+("1"+pd)
1600}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1601}}}}}}{{{#!if !br
1602{{{#!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))
1603{{{#!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,
r252
1604}}}}}}
r265
1605{{{#!if ty>ab
r252
1606{{{#!if au-=1, ab+=+("1"+pd)
r356
1607}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1608{{{#!if br=true
1609}}}}}}}}}
1610{{{#!if !br
r356
1611{{{#!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"
r265
1612}}}}}}
r252
1613##i=40
1614{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1615{{{#!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))
r359
1616{{{#!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
r252
1617}}}}}}
1618{{{#!if ty>ab
1619{{{#!if tn-=1, ab+=+("1"+pd)
1620}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1621}}}}}}{{{#!if !br
1622{{{#!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))
1623{{{#!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,
r252
1624}}}}}}
r265
1625{{{#!if ty>ab
r252
1626{{{#!if au-=1, ab+=+("1"+pd)
r356
1627}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1628{{{#!if br=true
1629}}}}}}}}}
1630{{{#!if !br
r356
1631{{{#!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"
r265
1632}}}}}}
r252
1633##i=41
1634{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1635{{{#!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))
r359
1636{{{#!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
r252
1637}}}}}}
1638{{{#!if ty>ab
1639{{{#!if tn-=1, ab+=+("1"+pd)
1640}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1641}}}}}}{{{#!if !br
1642{{{#!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))
1643{{{#!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,
r252
1644}}}}}}
r265
1645{{{#!if ty>ab
r252
1646{{{#!if au-=1, ab+=+("1"+pd)
r356
1647}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1648{{{#!if br=true
1649}}}}}}}}}
1650{{{#!if !br
r356
1651{{{#!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"
r265
1652}}}}}}
r252
1653##i=42
1654{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1655{{{#!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))
r359
1656{{{#!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
r252
1657}}}}}}
1658{{{#!if ty>ab
1659{{{#!if tn-=1, ab+=+("1"+pd)
1660}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1661}}}}}}{{{#!if !br
1662{{{#!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))
1663{{{#!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,
r252
1664}}}}}}
r265
1665{{{#!if ty>ab
r252
1666{{{#!if au-=1, ab+=+("1"+pd)
r356
1667}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1668{{{#!if br=true
1669}}}}}}}}}
1670{{{#!if !br
r356
1671{{{#!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"
r265
1672}}}}}}
r252
1673##i=43
1674{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1675{{{#!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))
r359
1676{{{#!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
r252
1677}}}}}}
1678{{{#!if ty>ab
1679{{{#!if tn-=1, ab+=+("1"+pd)
1680}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1681}}}}}}{{{#!if !br
1682{{{#!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))
1683{{{#!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,
r252
1684}}}}}}
r265
1685{{{#!if ty>ab
r252
1686{{{#!if au-=1, ab+=+("1"+pd)
r356
1687}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1688{{{#!if br=true
1689}}}}}}}}}
1690{{{#!if !br
r356
1691{{{#!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"
r265
1692}}}}}}
r252
1693##i=44
1694{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1695{{{#!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))
r359
1696{{{#!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
r252
1697}}}}}}
1698{{{#!if ty>ab
1699{{{#!if tn-=1, ab+=+("1"+pd)
1700}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1701}}}}}}{{{#!if !br
1702{{{#!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))
1703{{{#!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,
r252
1704}}}}}}
r265
1705{{{#!if ty>ab
r252
1706{{{#!if au-=1, ab+=+("1"+pd)
r356
1707}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1708{{{#!if br=true
1709}}}}}}}}}
1710{{{#!if !br
r356
1711{{{#!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"
r265
1712}}}}}}
r252
1713##i=45
1714{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1715{{{#!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))
r359
1716{{{#!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
r252
1717}}}}}}
1718{{{#!if ty>ab
1719{{{#!if tn-=1, ab+=+("1"+pd)
1720}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1721}}}}}}{{{#!if !br
1722{{{#!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))
1723{{{#!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,
r252
1724}}}}}}
r265
1725{{{#!if ty>ab
r252
1726{{{#!if au-=1, ab+=+("1"+pd)
r356
1727}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1728{{{#!if br=true
1729}}}}}}}}}
1730{{{#!if !br
r356
1731{{{#!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"
r265
1732}}}}}}
r252
1733##i=46
1734{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1735{{{#!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))
r359
1736{{{#!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
r252
1737}}}}}}
1738{{{#!if ty>ab
1739{{{#!if tn-=1, ab+=+("1"+pd)
1740}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1741}}}}}}{{{#!if !br
1742{{{#!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))
1743{{{#!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,
r252
1744}}}}}}
r265
1745{{{#!if ty>ab
r252
1746{{{#!if au-=1, ab+=+("1"+pd)
r356
1747}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1748{{{#!if br=true
1749}}}}}}}}}
1750{{{#!if !br
r356
1751{{{#!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"
r265
1752}}}}}}
r252
1753##i=47
1754{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1755{{{#!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))
r359
1756{{{#!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
r252
1757}}}}}}
1758{{{#!if ty>ab
1759{{{#!if tn-=1, ab+=+("1"+pd)
1760}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1761}}}}}}{{{#!if !br
1762{{{#!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))
1763{{{#!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,
r252
1764}}}}}}
r265
1765{{{#!if ty>ab
r252
1766{{{#!if au-=1, ab+=+("1"+pd)
r356
1767}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1768{{{#!if br=true
1769}}}}}}}}}
1770{{{#!if !br
r356
1771{{{#!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"
r265
1772}}}}}}
r252
1773##i=48
1774{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1775{{{#!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))
r359
1776{{{#!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
r252
1777}}}}}}
1778{{{#!if ty>ab
1779{{{#!if tn-=1, ab+=+("1"+pd)
1780}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1781}}}}}}{{{#!if !br
1782{{{#!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))
1783{{{#!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,
r252
1784}}}}}}
r265
1785{{{#!if ty>ab
r252
1786{{{#!if au-=1, ab+=+("1"+pd)
r356
1787}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1788{{{#!if br=true
1789}}}}}}}}}
1790{{{#!if !br
r356
1791{{{#!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"
r265
1792}}}}}}
r252
1793##i=49
1794{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1795{{{#!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))
r359
1796{{{#!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
r252
1797}}}}}}
1798{{{#!if ty>ab
1799{{{#!if tn-=1, ab+=+("1"+pd)
1800}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1801}}}}}}{{{#!if !br
1802{{{#!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))
1803{{{#!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,
r252
1804}}}}}}
r265
1805{{{#!if ty>ab
r252
1806{{{#!if au-=1, ab+=+("1"+pd)
r356
1807}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1808{{{#!if br=true
1809}}}}}}}}}
1810{{{#!if !br
r356
1811{{{#!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"
r265
1812}}}}}}
r252
1813##i=50
1814{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1815{{{#!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))
r359
1816{{{#!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
r252
1817}}}}}}
1818{{{#!if ty>ab
1819{{{#!if tn-=1, ab+=+("1"+pd)
1820}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1821}}}}}}{{{#!if !br
1822{{{#!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))
1823{{{#!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,
r252
1824}}}}}}
r265
1825{{{#!if ty>ab
r252
1826{{{#!if au-=1, ab+=+("1"+pd)
r356
1827}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1828{{{#!if br=true
1829}}}}}}}}}
1830{{{#!if !br
r356
1831{{{#!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"
r265
1832}}}}}}
r252
1833##i=51
1834{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1835{{{#!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))
r359
1836{{{#!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
r252
1837}}}}}}
1838{{{#!if ty>ab
1839{{{#!if tn-=1, ab+=+("1"+pd)
1840}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1841}}}}}}{{{#!if !br
1842{{{#!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))
1843{{{#!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,
r252
1844}}}}}}
r265
1845{{{#!if ty>ab
r252
1846{{{#!if au-=1, ab+=+("1"+pd)
r356
1847}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1848{{{#!if br=true
1849}}}}}}}}}
1850{{{#!if !br
r356
1851{{{#!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"
r265
1852}}}}}}
r252
1853##i=52
1854{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1855{{{#!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))
r359
1856{{{#!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
r252
1857}}}}}}
1858{{{#!if ty>ab
1859{{{#!if tn-=1, ab+=+("1"+pd)
1860}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1861}}}}}}{{{#!if !br
1862{{{#!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))
1863{{{#!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,
r252
1864}}}}}}
r265
1865{{{#!if ty>ab
r252
1866{{{#!if au-=1, ab+=+("1"+pd)
r356
1867}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1868{{{#!if br=true
1869}}}}}}}}}
1870{{{#!if !br
r356
1871{{{#!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"
r265
1872}}}}}}
r252
1873##i=53
1874{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1875{{{#!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))
r359
1876{{{#!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
r252
1877}}}}}}
1878{{{#!if ty>ab
1879{{{#!if tn-=1, ab+=+("1"+pd)
1880}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1881}}}}}}{{{#!if !br
1882{{{#!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))
1883{{{#!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,
r252
1884}}}}}}
r265
1885{{{#!if ty>ab
r252
1886{{{#!if au-=1, ab+=+("1"+pd)
r356
1887}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1888{{{#!if br=true
1889}}}}}}}}}
1890{{{#!if !br
r356
1891{{{#!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"
r265
1892}}}}}}
r252
1893##i=54
1894{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1895{{{#!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))
r359
1896{{{#!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
r252
1897}}}}}}
1898{{{#!if ty>ab
1899{{{#!if tn-=1, ab+=+("1"+pd)
1900}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1901}}}}}}{{{#!if !br
1902{{{#!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))
1903{{{#!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,
r252
1904}}}}}}
r265
1905{{{#!if ty>ab
r252
1906{{{#!if au-=1, ab+=+("1"+pd)
r356
1907}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1908{{{#!if br=true
1909}}}}}}}}}
1910{{{#!if !br
r356
1911{{{#!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"
r265
1912}}}}}}
r252
1913##i=55
1914{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1915{{{#!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))
r359
1916{{{#!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
r252
1917}}}}}}
1918{{{#!if ty>ab
1919{{{#!if tn-=1, ab+=+("1"+pd)
1920}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1921}}}}}}{{{#!if !br
1922{{{#!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))
1923{{{#!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,
r252
1924}}}}}}
r265
1925{{{#!if ty>ab
r252
1926{{{#!if au-=1, ab+=+("1"+pd)
r356
1927}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1928{{{#!if br=true
1929}}}}}}}}}
1930{{{#!if !br
r356
1931{{{#!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"
r265
1932}}}}}}
r252
1933##i=56
1934{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1935{{{#!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))
r359
1936{{{#!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
r252
1937}}}}}}
1938{{{#!if ty>ab
1939{{{#!if tn-=1, ab+=+("1"+pd)
1940}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1941}}}}}}{{{#!if !br
1942{{{#!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))
1943{{{#!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,
r252
1944}}}}}}
r265
1945{{{#!if ty>ab
r252
1946{{{#!if au-=1, ab+=+("1"+pd)
r356
1947}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1948{{{#!if br=true
1949}}}}}}}}}
1950{{{#!if !br
r356
1951{{{#!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"
r265
1952}}}}}}
r252
1953##i=57
1954{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1955{{{#!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))
r359
1956{{{#!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
r252
1957}}}}}}
1958{{{#!if ty>ab
1959{{{#!if tn-=1, ab+=+("1"+pd)
1960}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1961}}}}}}{{{#!if !br
1962{{{#!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))
1963{{{#!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,
r252
1964}}}}}}
r265
1965{{{#!if ty>ab
r252
1966{{{#!if au-=1, ab+=+("1"+pd)
r356
1967}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1968{{{#!if br=true
1969}}}}}}}}}
1970{{{#!if !br
r356
1971{{{#!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"
r265
1972}}}}}}
r252
1973##i=58
1974{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1975{{{#!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))
r359
1976{{{#!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
r252
1977}}}}}}
1978{{{#!if ty>ab
1979{{{#!if tn-=1, ab+=+("1"+pd)
1980}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
1981}}}}}}{{{#!if !br
1982{{{#!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))
1983{{{#!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,
r252
1984}}}}}}
r265
1985{{{#!if ty>ab
r252
1986{{{#!if au-=1, ab+=+("1"+pd)
r356
1987}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
1988{{{#!if br=true
1989}}}}}}}}}
1990{{{#!if !br
r356
1991{{{#!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"
r265
1992}}}}}}
r252
1993##i=59
1994{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
1995{{{#!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))
r359
1996{{{#!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
r252
1997}}}}}}
1998{{{#!if ty>ab
1999{{{#!if tn-=1, ab+=+("1"+pd)
2000}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2001}}}}}}{{{#!if !br
2002{{{#!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))
2003{{{#!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,
r252
2004}}}}}}
r265
2005{{{#!if ty>ab
r252
2006{{{#!if au-=1, ab+=+("1"+pd)
r356
2007}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2008{{{#!if br=true
2009}}}}}}}}}
2010{{{#!if !br
r356
2011{{{#!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"
r265
2012}}}}}}
r252
2013##i=60
2014{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2015{{{#!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))
r359
2016{{{#!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
r252
2017}}}}}}
2018{{{#!if ty>ab
2019{{{#!if tn-=1, ab+=+("1"+pd)
2020}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2021}}}}}}{{{#!if !br
2022{{{#!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))
2023{{{#!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,
r252
2024}}}}}}
r265
2025{{{#!if ty>ab
r252
2026{{{#!if au-=1, ab+=+("1"+pd)
r356
2027}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2028{{{#!if br=true
2029}}}}}}}}}
2030{{{#!if !br
r356
2031{{{#!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"
r265
2032}}}}}}
r252
2033##i=61
2034{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2035{{{#!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))
r359
2036{{{#!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
r252
2037}}}}}}
2038{{{#!if ty>ab
2039{{{#!if tn-=1, ab+=+("1"+pd)
2040}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2041}}}}}}{{{#!if !br
2042{{{#!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))
2043{{{#!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,
r252
2044}}}}}}
r265
2045{{{#!if ty>ab
r252
2046{{{#!if au-=1, ab+=+("1"+pd)
r356
2047}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2048{{{#!if br=true
2049}}}}}}}}}
2050{{{#!if !br
r356
2051{{{#!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"
r265
2052}}}}}}
r252
2053##i=62
2054{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2055{{{#!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))
r359
2056{{{#!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
r252
2057}}}}}}
2058{{{#!if ty>ab
2059{{{#!if tn-=1, ab+=+("1"+pd)
2060}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2061}}}}}}{{{#!if !br
2062{{{#!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))
2063{{{#!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,
r252
2064}}}}}}
r265
2065{{{#!if ty>ab
r252
2066{{{#!if au-=1, ab+=+("1"+pd)
r356
2067}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2068{{{#!if br=true
2069}}}}}}}}}
2070{{{#!if !br
r356
2071{{{#!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"
r265
2072}}}}}}
r252
2073##i=63
2074{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2075{{{#!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))
r359
2076{{{#!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
r252
2077}}}}}}
2078{{{#!if ty>ab
2079{{{#!if tn-=1, ab+=+("1"+pd)
2080}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2081}}}}}}{{{#!if !br
2082{{{#!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))
2083{{{#!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,
r252
2084}}}}}}
r265
2085{{{#!if ty>ab
r252
2086{{{#!if au-=1, ab+=+("1"+pd)
r356
2087}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2088{{{#!if br=true
2089}}}}}}}}}
2090{{{#!if !br
r356
2091{{{#!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"
r265
2092}}}}}}
r252
2093##i=64
2094{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2095{{{#!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))
r359
2096{{{#!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
r252
2097}}}}}}
2098{{{#!if ty>ab
2099{{{#!if tn-=1, ab+=+("1"+pd)
2100}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2101}}}}}}{{{#!if !br
2102{{{#!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))
2103{{{#!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,
r252
2104}}}}}}
r265
2105{{{#!if ty>ab
r252
2106{{{#!if au-=1, ab+=+("1"+pd)
r356
2107}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2108{{{#!if br=true
2109}}}}}}}}}
2110{{{#!if !br
r356
2111{{{#!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"
r265
2112}}}}}}
r252
2113##i=65
2114{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2115{{{#!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))
r359
2116{{{#!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
r252
2117}}}}}}
2118{{{#!if ty>ab
2119{{{#!if tn-=1, ab+=+("1"+pd)
2120}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2121}}}}}}{{{#!if !br
2122{{{#!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))
2123{{{#!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,
r252
2124}}}}}}
r265
2125{{{#!if ty>ab
r252
2126{{{#!if au-=1, ab+=+("1"+pd)
r356
2127}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2128{{{#!if br=true
2129}}}}}}}}}
2130{{{#!if !br
r356
2131{{{#!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"
r265
2132}}}}}}
r252
2133##i=66
2134{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2135{{{#!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))
r359
2136{{{#!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
r252
2137}}}}}}
2138{{{#!if ty>ab
2139{{{#!if tn-=1, ab+=+("1"+pd)
2140}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2141}}}}}}{{{#!if !br
2142{{{#!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))
2143{{{#!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,
r252
2144}}}}}}
r265
2145{{{#!if ty>ab
r252
2146{{{#!if au-=1, ab+=+("1"+pd)
r356
2147}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2148{{{#!if br=true
2149}}}}}}}}}
2150{{{#!if !br
r356
2151{{{#!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"
r265
2152}}}}}}
r252
2153##i=67
2154{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2155{{{#!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))
r359
2156{{{#!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
r252
2157}}}}}}
2158{{{#!if ty>ab
2159{{{#!if tn-=1, ab+=+("1"+pd)
2160}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2161}}}}}}{{{#!if !br
2162{{{#!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))
2163{{{#!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,
r252
2164}}}}}}
r265
2165{{{#!if ty>ab
r252
2166{{{#!if au-=1, ab+=+("1"+pd)
r356
2167}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2168{{{#!if br=true
2169}}}}}}}}}
2170{{{#!if !br
r356
2171{{{#!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"
r265
2172}}}}}}
r252
2173##i=68
2174{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2175{{{#!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))
r359
2176{{{#!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
r252
2177}}}}}}
2178{{{#!if ty>ab
2179{{{#!if tn-=1, ab+=+("1"+pd)
2180}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2181}}}}}}{{{#!if !br
2182{{{#!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))
2183{{{#!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,
r252
2184}}}}}}
r265
2185{{{#!if ty>ab
r252
2186{{{#!if au-=1, ab+=+("1"+pd)
r356
2187}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2188{{{#!if br=true
2189}}}}}}}}}
2190{{{#!if !br
r356
2191{{{#!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"
r265
2192}}}}}}
r252
2193##i=69
2194{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2195{{{#!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))
r359
2196{{{#!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
r252
2197}}}}}}
2198{{{#!if ty>ab
2199{{{#!if tn-=1, ab+=+("1"+pd)
2200}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2201}}}}}}{{{#!if !br
2202{{{#!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))
2203{{{#!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,
r252
2204}}}}}}
r265
2205{{{#!if ty>ab
r252
2206{{{#!if au-=1, ab+=+("1"+pd)
r356
2207}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2208{{{#!if br=true
2209}}}}}}}}}
2210{{{#!if !br
r356
2211{{{#!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"
r265
2212}}}}}}
r252
2213##i=70
2214{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2215{{{#!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))
r359
2216{{{#!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
r252
2217}}}}}}
2218{{{#!if ty>ab
2219{{{#!if tn-=1, ab+=+("1"+pd)
2220}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2221}}}}}}{{{#!if !br
2222{{{#!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))
2223{{{#!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,
r252
2224}}}}}}
r265
2225{{{#!if ty>ab
r252
2226{{{#!if au-=1, ab+=+("1"+pd)
r356
2227}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2228{{{#!if br=true
2229}}}}}}}}}
2230{{{#!if !br
r356
2231{{{#!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"
r265
2232}}}}}}
r252
2233##i=71
2234{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r356
2235{{{#!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))
r359
2236{{{#!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
r252
2237}}}}}}
2238{{{#!if ty>ab
2239{{{#!if tn-=1, ab+=+("1"+pd)
2240}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r356
2241}}}}}}{{{#!if !br
2242{{{#!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))
2243{{{#!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,
r252
2244}}}}}}
r265
2245{{{#!if ty>ab
r252
2246{{{#!if au-=1, ab+=+("1"+pd)
r356
2247}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw, (au==0)&&(ab==0)
r252
2248{{{#!if br=true
r265
2249}}}}}}}}}
r295
2250tn을 빈 문자열로 초기화하고 변수 ts를 가져옵니다. 마지막 72회까지 몫을 구하는 계산을 했음에도 불구하고 나머지가 나누어떨어져 0이 되지 않는다면 tn을 "..."로, ts를 true로 바꿉니다.
2251{{{#!if tn="", !br
r254
2252{{{#!if tn="...", ts=true
r256
2253}}}}}}
r238
2254
r205
2255##rs 매기기
r257
2256앞에 매겼던 ac와 bc로 판별식을 만듭니다. i=ac-bc로 둡니다. a의 가장 큰 자리와 b의 가장 큰 자리가 얼마나 차이나는가에 따라 몫에 매기는 소수점 위치가 달라집니다. i>=-35 (ac==-18이고 bc==17일 경우), i<=35 (ac==17이고 bc=-18일 경우)입니다.
r273
2257{{{#!if i=ac-bc
2258}}}
r281
2259a에서 b를 나누면 몫을 10^i 의 자리부터 매기게 됩니다. 소수점 아랫부분까지 몫 기록이 이어지면 상관이 없겠으나, 몫이 소수가 아닌 정수로 기록될 때 실제 자릿수에 해당하는 길이보다 (금방 나누어떨어져) 몫이 짧게 기록되고 그치는 경우 남는 자리에 자동적으로 0을 채워주지 않게 됩니다. 이러면 수동으로 0을 채워주어야 하며, (i==0일 경우 10^0의 자리부터 몫을 기록하므로 10^1과 같거나 큰 자리부터 기록할 경우 곧) i>0일 때에만 의미가 있습니다.
2260이를테면 4000/2를 계산하는 경우 몫이 "2"까지만 기록되며 뒤에 000은 수동으로 채워주어야 합니다.
2261{{{#!if i>0
2262몫은 tm으로 기록되므로 tm의 길이를 따집니다. i가 양수이고 몫이 정수로 나누어떨어질 경우, tm의 길이가 적어도 i+1이 되게 맞춥니다.
2263{{{#!if i+1>tm.length
2264i+1보타 tm의 길이가 작은 경우 i==35인 경우를 감안하여 tm의 뒷부분을 pd+pd --더블 패드--로 채운 다음 i+1길이만큼 오려냅니다.
2265{{{#!if tm+=pd+pd, tm=tm.substr(0,i+1)
2266}}}}}}}}}
2267
r257
2268i가 18 이상 (18 이상 35 이하)이면 rs를 매길 수 있습니다. 몫을 적어놓은 문자열 tm의 0번 index에 들어가는 문자부터 i에서 18을 뺀 값의 index에 들어가는 문자까지를 rs로 두며, rs의 문자열 길이는 i-18+1 곧 i-17입니다.
r273
2269{{{#!if i>=18
r257
2270tm에서 rs를 오려낸 문자열을 tm으로 다시 둡니다.
2271{{{#!if rs=tm.substr(0,i-17), tm=tm.substr(i-17)
2272}}}}}}
r273
2273
r205
2274##ru 매기기
r294
2275ps를 먼저 false로 초기화한 다음, i>=18 이 되(어 rs를 매기)는 경우 ps를 true로 맞춥니다.
2276{{{#!if ps=false, i>=18
r273
2277{{{#!if ps=true
r257
2278}}}}}}
r273
2279ps가 true이면 문자열 tm에서 18번째 자리까지를 ru로 두고, tm에서 ru를 오려낸 문자열을 tm으로 둡니다.
2280{{{#!if ps
2281{{{#!if ru=tm.substr(0,18), tm=tm.substr(18)
2282}}}}}}
2283ps가 false이고 (i가 충분히 큰 값이 아니고) i가 0 이상 (0 이상 17 이하)인 수라면 ru를 매길 수 있으며 문자열의 길이는 i+1이 됩니다.
2284{{{#!if !ps&&(i>=0)
r270
2285{{{#!if ru=tm.substr(0,i+1), tm=tm.substr(i+1)
r257
2286}}}}}}
r205
2287
2288##rb 매기기
r273
2289i>=0이 되(어 ru를 매기)는 경우 ps를 true로 맞춥니다.
r257
2290{{{#!if i>=0
r273
2291{{{#!if ps=true
r269
2292}}}}}}
r273
2293ps가 true이면 문자열 tm에서 18번째 자리까지를 rb로 두고, tm에서 rb를 오려낸 문자열을 tm으로 둡니다.
2294{{{#!if ps
2295{{{#!if rb=tm.substr(0,18), tm=tm.substr(18)
r257
2296}}}}}}
r273
2297ps가 false이고 i가 -18 이상 (-18 이상 -1 이하)이면 rb를 매길 수 있습니다.
r275
2298이 때 몫으로 문자열의 길이는 i+18+1 곧 i+19가 되며 그 앞부분은 0으로 채워집니다.
2299몫으로 i+19개의 자리가 채워진다면, 몫 앞을 0으로 채우는 수량은 18에서 i+19를 뺀 -i-1이 됩니다.
2300이것을 substr을 이용하여 (18자리 문자열인) pd의 substr로 채워보자면
230118에서 (-i-1)을 뺀 i+19 번부터 끝까지 해당하는 문자열로 채우면 됩니다.
r302
2302{{{#!if !ps
2303{{{#!if i>=-18
r275
2304{{{#!if rb=tm.substr(0,i+19), tm=tm.substr(i+19), rb=pd.substr(i+19)+rb
r273
2305}}}}}}
r302
2306만일 i<0이고 i가 -18보다 작아 rb에 몫을 기록하지 않고 rb보다 더 아래 자리에 기록하게 된다면 rb의 18자리를 모두 0으로 채웁니다.
2307{{{#!if i<-18
2308{{{#!if rb=pd
2309}}}}}}
2310}}}
r205
2311
2312##ri 매기기
r273
2313i>=-18이 되(어 rb를 매기)는 경우 ps를 true로 맞춥니다.
r257
2314{{{#!if i>=-18
r273
2315{{{#!if ps=true
r269
2316}}}}}}
r273
2317ps가 true이면 rb와 같은 방법으로 ri를 매기고, tm을 다시 정의합니다.
2318{{{#!if ps
2319{{{#!if ri=tm.substr(0,18), tm=tm.substr(18)
r257
2320}}}}}}
r273
2321ps가 false이며 i가 -19 이하 (-36이상 -19 이하이나, i의 최소값은 -35)이면 ri를 매길 수 있습니다. rb와 같습니다.
2322{{{#!if !ps&&(i>=-36)
r275
2323{{{#!if ri=tm.substr(0,i+37), tm=tm.substr(i+37), ri=pd.substr(i+37)+ri
r273
2324}}}
2325}}}
2326
r290
2327ri까지 몫을 기록했음에도 불구하고 여전히 몫이 남는다면 ... 처리를 하고 ts를 true로 바꿉니다.
r282
2328{{{#!if tm.length>0
r290
2329{{{#!if tn="...", ts=true
r282
2330}}}}}}
2331
r240
2332여기까지가 나눗셈의 계산과정입니다.
r203
2333}}}
2334
r270
2335##== 계산 결과 표시 정리하기 ==
r312
2336##=== 결과값 표시 정리하기 ===
r240
2337연산이 끝났으면 표기된 숫자를 정리합니다.
2338
r295
2339##rs, ru 정리 부분
r314
2340먼저 ru를 (곱셈연산에서 정수값으로 나올 수 있고, 나눗셈에서 몫이 1보다 작은 값이 나오는 경우같이 값을 부여하지 않았다면 초기화할 때 정의했던 정수 0인 채로 있으므로) 문자열로 바꿉니다.
r171
2341{{{#!if ru=ru.toString()
r271
2342}}}
234318자리씩 끊어 표기하므로 소수점 위 19~36번째 자리에 해당하는 rs값이 (가령 곱셈에서, 곱한 값을 더한 결과가) 0일 경우 rs를 빈 문자열로 바꿉니다. 이 때 ru를 정수로 바꿔 ru 왼쪽에 있는 0들을 지운 다음, ru를 문자열로 바꿉니다.
2344{{{#!if +rs==0
2345{{{#!if rs="", ru=+ru, ru=ru.toString()
2346}}}}}}
2347
2348계산과정에서 ru의 윗자리인 rs값이 0보다 클 경우, 1~18번째 자리인 ru에 빈 자리를 채우도록 ru의 왼쪽을 0으로 채웁니다.
2349{{{#!if +rs>0
r237
2350{{{#!if rs=rs.toString(), ru=pd+ru, ru=ru.substr(ru.length-18, 18)
r271
2351}}}
2352rs를 정수로 바꿔 rs 앞에 있는 0들을 지운 다음 rs를 문자열로 바꿉니다.
2353{{{#!if rs=+rs, rs=rs.toString()
r179
2354}}}}}}
r163
2355
r295
2356##rb, ri 정리 부분
r297
2357i보다 소수점 아래부분을 더 써내려가야 하는 상황이 아닌(나눗셈에서 ts가 false인) 경우에서, 소수점 아래 19~36번째 자리에 해당하는 ri값이 0일 경우 ri를 빈 문자열로 바꿉니다.
r188
2358이 때 ri와 rb가 모두 0일 경우 rb도 빈 문자열로 바꾸고 rp=0으로 둡니다.
r295
2359{{{#!if !ts
r282
2360{{{#!if +ri==0
r171
2361{{{#!if ri=""
r282
2362}}}{{{#!if +rb==0
r188
2363{{{#!if rb="", rp=0
r295
2364}}}}}}}}}}}}
r188
2365
r295
2366ri가 빈 문자열이 아닐 (+ri가 0보다 클) 때 true를 주는 논리값으로 ps를 정의합니다.
2367{{{#!if ps=(+ri>0)
2368}}}
r171
2369
r297
2370{{{#!if f=="*"
r298
2371곱셈연산에서 ri가 비어있지 않을 경우 ri와 rb를 문자열로 바꾼 다음 각각 왼쪽을 0으로 채웁니다.
2372{{{#!if ps
2373{{{#!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)
2374}}}}}}
r299
2375곱셈연산에서 ri가 비어있으나 rb가 비어있지 않을 경우 rb를 문자열로 바꾼 다음 rb의 왼쪽을 0으로 채웁니다.
2376{{{#!if !ps&&(+rb>0)
r237
2377{{{#!if rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
r188
2378}}}}}}
r297
2379}}}
r188
2380
r295
2381!ts인 상황에서 ps가 true이면 rp를 ri의 길이로, 그렇지 않고 rb만 0이 아닌경우 rp를 rb의 길이로 정의합니다.
2382{{{#!if !ts
r196
2383{{{#!if ps
r198
2384{{{#!if this.rp=ri.length
r286
2385}}}
r300
2386ps가 true일 때 19~36번째 자리인 ri까지 계산하므로 rp에 18을 더해야 하지만, 문자열 정리를 하기 위해 문자열의 index 번호를 다루고자 18을 더하는 작업은 뒤로 뻅니다.
2387}}}
r286
2388
2389{{{#!if !ps&&(rb!="")
r198
2390{{{#!if this.rp=rb.length
r167
2391}}}}}}
2392
r295
2393!ts이면서 ri가 빈 문자열이 아닐 경우 ri의 오른쪽부터 붙은 "0"들을 모두 지웁니다.
r175
2394{{{#!if ps
r232
2395{{{#!if (rp>9)&&(ri.substr(rp-9,9)=="000000000")
r300
2396{{{#!if this.ri=ri.substr(0,rp-9), rp-=9
r175
2397}}}}}}
r232
2398{{{#!if (rp>4)&&(ri.substr(rp-4,4)=="0000")
r300
2399{{{#!if this.ri=ri.substr(0,rp-4), rp-=4
r175
2400}}}}}}
r232
2401{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r300
2402{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r175
2403}}}}}}
r232
2404{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r300
2405{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r175
2406}}}}}}
r232
2407{{{#!if (rp>1)&&(ri.substr(rp-1,1)=="0")
r300
2408{{{#!if this.ri=ri.substr(0,rp-1), rp-=1
2409}}}}}}
2410문자열 정리를 끝냈을 때 rp에 18을 더합니다.
2411{{{#!if rp+=18
2412}}}}}}
r67
2413
r295
2414!ts이면서 이면서 ri가 빈 문자열일 경우, rb의 오른쪽에 붙은 "0"들을 모두 지웁니다,
r176
2415{{{#!if !ps
r232
2416{{{#!if (rp>9)&&(rb.substr(rp-9,9)=="000000000")
r300
2417{{{#!if this.rb=rb.substr(0,rp-9), rp-=9
r171
2418}}}}}}
r232
2419{{{#!if (rp>4)&&(rb.substr(rp-4,4)=="0000")
r300
2420{{{#!if this.rb=rb.substr(0,rp-4), rp-=4
r171
2421}}}}}}
r232
2422{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r300
2423{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r171
2424}}}}}}
r232
2425{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r300
2426{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r171
2427}}}}}}
r232
2428{{{#!if (rp>1)&&(rb.substr(rp-1,1)=="0")
r300
2429{{{#!if this.rb=rb.substr(0,rp-1), rp-=1
r175
2430}}}}}}}}}
r295
2431}}}
r292

(r290으로 되돌림)
2432
r295
2433ts인 경우 rb, ri의 오른쪽 부분을 정리하지 않고 rp를 39로 정의합니다.
2434{{{#!if ts
2435{{{#!if rp=39
2436}}}}}}
2437
2438
2439
r171
2440rb 정리를 이것으로 종료합니다.
2441
r225
2442##== 오류 코드 ==
2443error
24441 : 오버플로
r347
24452 : 언더플로 (사용하지 않음)
24463 : 0으로 나눌 수 없음
24474 : 0으로 연산할 수 없음 (사용하지 않음)
r225
24485 : 이중 소수점 표기
24496 : 소수점 윗부분 오류
24507 : 소수점 아랫부분 오류
2451
2452warning
24531 : 소수점 아래 입력한 자릿수가 너무 많음.
2454
2455##== 아래 출력 변수 설명 ==
r346
2456'''sa''' : searching a (logical); '''sb''' : searching b (logical); '''sf''' : searching f (logical);
2457'''ps''' : pass (logical);
r318
2458'''ad''' : "a" decimal point of string variable 'ma' (integer);
2459'''bd''' : "b" decimal point of string variable 'mb' (integer);
2460'''md''' : displaying mode number (string→integer); '''ms''' : message for correction (string)
r320
2461'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r316
2462'''tx''' : temporary value 1 (integer); '''ty''' : temporary value 2 (integer); '''tz''' : temporary value 3 (integer);
r346
2463'''comment''' : comment (string);
r91
2464ru는 계산결과에서 소수점 위 자리이므로, dot(.)이 나오지 않습니다.
r348
2465##== 출력 부분 ==
2466##=== 계산값 출력 (정상 출력) ===
r285
2467}}}{{{#!wiki style="font-weight: 300; font-size: 17.5px;"
r320
2468{{{#!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=""
r330
2469}}}{{{#!if !(sa&sb&sf)
2470{{{#!if !sa||!sb
2471변수 {{{#!if !sa
r331
2472a{{{#!if !sb
2473와 변수 }}}}}}{{{#!if !sb
r332
2474b}}}}}}{{{#!if !sf
r331
2475{{{#!if !sa&!sb
r333
2476, 그리고 }}}{{{#!if !sa^!sb
r331
2477와 }}}연산자 f}}}를 입력하세요...}}}{{{#!if sa&&sb&&sf
r119
2478{{{#!if (ea==0)&&(eb==0)
r82
2479{{{#!if as[0]!=45
r53
2480@a@}}}{{{#!if as[0]==45
r117
2481(@a@)}}} {{{#!if as.length>=20
r317
2482[br]}}}@f@ {{{#!if bs[0]!=45
r53
2483@b@}}}{{{#!if bs[0]==45
r320
2484(@b@)}}} {{{#!if (ma!=as)||(mb!=bs)||(+md==3)||(+md==4)
r317
2485{{{#!if (as.length+bs.length>=30)
r318
2486[br]}}}→ {{{#!if ms=ma, ad!=-1
2487{{{#!if ms=ma.substr(0,ad)
r322
2488}}}}}}{{{#!if ps=false, ms[0]==45
r319
2489{{{#!if ms=ms.substr(1), ps=true
r321
2490}}}}}}{{{#!if (+md==3)||(+md==4)
2491{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r328
2492{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r320
2493}}}}}}{{{#!if (ty>0)&&(tz>0)
2494{{{#!if tm+=","
2495}}}}}}{{{#!if ty-->0
r326
2496{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r320
2497}}}}}}{{{#!if ty-->0
r326
2498{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2499}}}}}}{{{#!if ty-->0
r326
2500{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2501}}}}}}{{{#!if ty-->0
r326
2502{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2503}}}}}}{{{#!if ty-->0
r326
2504{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2505}}}}}}{{{#!if ty-->0
r326
2506{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r321
2507}}}}}}{{{#!if ms=tm
r324
2508}}}}}}{{{#!if ps
2509(-}}}@ms@{{{#!if ad!=-1
2510{{{#!if ms=ma.substr(ad+1)
2511}}}{{{#!if (+md==3)||(+md==4)
r326
2512{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
2513{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2514}}}}}}{{{#!if ty-->0
r326
2515{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2516}}}}}}{{{#!if ty-->0
r326
2517{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2518}}}}}}{{{#!if ty-->0
r326
2519{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2520}}}}}}{{{#!if ty-->0
r326
2521{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2522}}}}}}{{{#!if ms=tm
r325
2523}}}}}}.@ms@}}}{{{#!if ps
r327
2524)}}} @f@ {{{#!if tm="", tn="", ms=mb, bd!=-1
r318
2525{{{#!if ms=mb.substr(0,bd)
r322
2526}}}}}}{{{#!if ps=false, ms[0]==45
r320
2527{{{#!if ms=ms.substr(1), ps=true
r321
2528}}}}}}{{{#!if (+md==3)||(+md==4)
2529{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r328
2530{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r320
2531}}}}}}{{{#!if (ty>0)&&(tz>0)
2532{{{#!if tm+=","
2533}}}}}}{{{#!if ty-->0
r326
2534{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r320
2535}}}}}}{{{#!if ty-->0
r326
2536{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2537}}}}}}{{{#!if ty-->0
r326
2538{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2539}}}}}}{{{#!if ty-->0
r326
2540{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2541}}}}}}{{{#!if ty-->0
r326
2542{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r320
2543}}}}}}{{{#!if ty-->0
r326
2544{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r321
2545}}}}}}{{{#!if ms=tm
r324
2546}}}}}}{{{#!if ps
2547(-}}}@ms@{{{#!if bd!=-1
2548{{{#!if ms=mb.substr(bd+1)
2549}}}{{{#!if (+md==3)||(+md==4)
r326
2550{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
2551{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2552}}}}}}{{{#!if ty-->0
r326
2553{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2554}}}}}}{{{#!if ty-->0
r326
2555{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2556}}}}}}{{{#!if ty-->0
r326
2557{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2558}}}}}}{{{#!if ty-->0
r326
2559{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r324
2560}}}}}}{{{#!if ms=tm
r325
2561}}}}}}.@ms@}}}{{{#!if ps
r324
2562)}}} }}}{{{#!if (bs.length>=20)||(as.length+bs.length>=30)
r339
2563[br]}}}= @ns@{{{#!if comment="rs 표시 부분", ms=rs, tx=6%(+md), tm="", tn="", (+md==3)||(+md==4)
r341
2564{{{#!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
r340
2565{{{#!if tm+=tn.substr(0,tz), tn=tn.substr(tz), ty>0
2566{{{#!if tm+=","
r341
2567}}}}}}}}}{{{#!if ty-->0
2568{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
2569}}}}}}{{{#!if ty-->0
2570{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2571}}}}}}{{{#!if ty-->0
2572{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2573}}}}}}{{{#!if ty-->0
2574{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2575}}}}}}{{{#!if ty-->0
2576{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2577}}}}}}{{{#!if ty-->0
2578{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r342
2579}}}}}}{{{#!if ms=tm
r344
2580}}}}}}@ms@{{{#!if comment="rs의 값이 존재하고 끊는 단위로 떨어질 때 자릿수 구분 기호인 반점을 새깁니다.", ms=((rs!="")&&(18%(+md)==0))?",":""
r343
2581}}}@ms@{{{#!if comment="ru 표시 부분", ms=ru, tm="", tn="", (+md==3)||(+md==4)
2582{{{#!if tn=ms, ty=ms.length, tz=ty%(+md), ty=ty/(+md), tz>0
2583{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
2584}}}}}}{{{#!if (ty>0)&&(tz>0)
2585{{{#!if tm+=","
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 ty-->0
2593{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2594}}}}}}{{{#!if ty-->0
2595{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2596}}}}}}{{{#!if ty-->0
2597{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
2598}}}}}}{{{#!if ms=tm
2599}}}}}}@ms@{{{#!if +rp>0
r105
2600##rb string, decimal point marking
r343
2601.{{{#!if comment="rb 표시 부분", ms=rb, tm="", tn="", (+md==3)||(+md==4)
2602{{{#!if tn=ms, ty=ms.length, ty=ty/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), 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 ty-->0
2611{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2612}}}}}}{{{#!if ms=tm
2613}}}}}}@ms@{{{#!if ri!=""
r344
2614{{{#!if comment="ri의 값이 존재하고 끊는 단위로 떨어질 때 자릿수를 매기고자 띄어쓰기를 넣습니다.", ms=(18%(+md)==0)?" ":""
r343
2615}}}@ms@{{{#!if comment="ri 표시 부분", ms=ri, tm="", tn="", (+md==3)||(+md==4)
r345
2616{{{#!if comment="rs의 경우와 같이, md만큼 떼었을 때 rb에서 모자라는 자릿수를 먼저 끊어 표시합니다.", tn=ms, ty=ms.length, ty=(ty+tx)/(+md), tm=tn.substr(0,tx), tn=tn.substr(tx), ty>0
2617{{{#!if tm+=" "
2618}}}}}}{{{#!if ty-->0
2619{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
2620}}}}}}{{{#!if ty-->0
r343
2621{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2622}}}}}}{{{#!if ty-->0
2623{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2624}}}}}}{{{#!if ty-->0
2625{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2626}}}}}}{{{#!if ty-->0
2627{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2628}}}}}}{{{#!if ty-->0
2629{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
2630}}}}}}{{{#!if ms=tm
r349
2631}}}}}}@ms@{{{#!if (f=='/')&&ts
r350
2632...}}}}}}}}}}}}}}}{{{#!if (ea>0)||(eb>0)
r348
2633##=== 오류 · 경고 코드 출력 부분 ===
r119
2634{{{#!if (ea==1)||(eb==1)
r201
2635'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==1
r119
2636a{{{#!if eb==1
2637와 }}}}}}{{{#!if eb==1
r308
2638b}}}에 범위를 초과하는 값이 입력되었습니다. {{{#gray (오버플로)}}}{{{#!if ea!=eb
2639[br]}}}}}}{{{#!if eb==3
2640'''{{{#orangered [오류]}}}''' 0으로 나눌 수 없습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
2641[br]}}}}}}{{{#!if (ea==5)||(eb==5)
r225
2642'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==5
2643a{{{#!if eb==5
2644와 }}}}}}{{{#!if eb==5
r308
2645b}}}에 소수점이 2개 이상 입력되었습니다. {{{#gray (입력 오류)}}}}}}{{{#!if (ea==6)||(eb==6)
r225
2646'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==6
2647a의 소수점 윗자리{{{#!if eb==6
2648와 }}}}}}{{{#!if eb==6
r289
2649b의 소수점 윗자리}}}에 올바르지 않은 문구{{{#!if ps=(((ea==6)&&(eb==7))||((ea==7)&&(eb==6))), ps
r288
2650가, }}}{{{#!if !ps
r308
2651가 입력되었습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
2652[br]}}}}}}}}}{{{#!if (ea==7)||(eb==7)
r288
2653{{{#!if !ps
2654'''{{{#orangered [오류]}}}'''}}} 변수 {{{#!if ea==7
r225
2655a의 소수점 아랫자리{{{#!if eb==7
2656와 }}}}}}{{{#!if eb==7
r309
2657b의 소수점 아랫자리}}}에 올바르지 않은 문구가 입력되었습니다. {{{#gray (입력 오류)}}}}}}}}}{{{#!if ((wa>0)||(wb>0))&&(((ea==0)&&(eb==0))||((wb==1)&&(eb==3)))
r310
2658{{{#!if (eb!=3)||((ea>3)&&(eb==3))
r308
2659[br]}}}{{{#!wiki style="display: inline; text-shadow: 1px 1px 2px gray;"
r311
2660'''{{{#yellow [경고] }}}'''}}}변수 {{{#!if (wa==1)&&(ea==0)
2661a{{{#!if (wb==1)&&(ea==0)
r278
2662와 }}}}}}{{{#!if wb==1
2663b}}}의 소수점 아래에 입력한 문구가 너무 많습니다. 소수점 아래 19번째 자리부터 입력된 문구는 무시됩니다.
r361
2664}}}}}}[include(틀:편집기 열기, 문서명=틀:계산기2)][include(틀:계산기/설명문서)]