본문으로 건너뛰기

계산기2(r355판 Blame)

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