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

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

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

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