본문으로 건너뛰기

계산기2(r349판 Blame)

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