본문으로 건너뛰기

계산기2(r360판 Blame)

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