본문으로 건너뛰기

계산기2(r345판 Blame)

r345
r297
1[[분류:냥]][[분류:계산용 틀]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:구 계산기2)][Include(틀:상세 내용, 설명대상=떼어낸 계산기, 문서명=틀\:계산기/구버전)]{{{#!wiki style="display: none;"
r129
2##디버그용 if 문법 ("문자열" 값으로 정의해야 합니다.)
r330
3{{{#!if a= ,b= ,f=, md=
r182
4}}}
r209
5##== 변수 설명 ==
r50
6'''as''' : "a" value to string; '''bs''' : "b" value to string;
r51
7'''al''' : "a" string length (integer); '''bl''' : "b" string length (integer)
8'''ad''' : "a" decimal point (integer); '''bd''' : "b" decimal point (integer);
9'''au''' : --gold-- "a" upper value (string→integer); '''bu''' : "b" upper value (string→integer);
10'''ab''' : "a" below value (string→integer); '''bb''' : "b" below value (string→integer);
r202
11'''ap''' : "a" # of places of decimal (for addition or subtraction);
r207
12'''ac''' : a '''c'''onstant of "a" for division (integer);
r202
13'''bp''' : "b" # of places of decimal (for addition or subtraction);
r207
14'''bc''' : a '''c'''onstant of "b" for division (integer);
r50
150.303과 0.0303은 다른 수이므로 자리수가 다름을 표시할 용도
r73
16'''ru''' : "result" upper value (integer→string); '''rb''' : "result" below value (integer→string);
17'''rp''' : "result" # of places of decimal (integer);
r117
18'''rs''' : "result" suprerior value (integer→string); '''ri''' : "result" inferior value (integer→string);
r209
19'''i''' : index;
20'''tu''' : temporary value 1 (integer); '''tv''' : temporary value 2 (integer);
r235
21'''tw''' : temporary value 3 (integer); '''tx''' : temporary value 4 (integer→string);
22'''ty''' : temporary value 5 (integer); '''tz''' : temporary value 6 (integer);
r228
23'''pd''' : padding with zeros. (string)
r208
24'''ps''' : pass (logical); '''ts''' : --not about gender-- test (logical) ; '''br''' : break (logical);
r209
25'''ea''' : error code about "a" (integer); '''eb''' : error code about "b" (integer);
26'''wa''' : warning code about "a" (integer); '''wb''' : warning code about "b" (integer);
27'''ma''' : message about "a" (string); '''mb''' : message about "b" (string);
28'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r158
29'''ns''' : negative sign for multiplication and division (string);
r209
30
31##== 초기화 ==
32값을 미리 정의하여 초기화합니다. 중간에 --장난으로-- 계산에 사용되는 변수에 값을 부여한 채로 include 하더라도 이를 무시합니다.
r308
33{{{#!if this.as=a.toString(), this.bs=b.toString(), this.rs=0+0, this.ru=0+0, this.rb=0+0, this.ri=0+0, this.rp=0+0, this.i=0+0, this.tu=0, this.tv=1+0, this.tw=0, this.tx=0, this.ty=0, this.ea=0+0, this.eb=0+0, this.wa=0+0, this.wb=0+0, this.ps=false, this.ts=false, this.br=false, this.ns="", this.ma="", this.mb="", this.tm="", this.tn="", this.ms="", this.pd="000000000000000000"
r135
34}}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".")
r48
35}}}{{{#!if ad!=-1
r126
36소수점이 발견되는 자리 번호가 ad이므로 ad+1번에 해당되는 자리부터 끝까지 표기합니다.
r51
37{{{#!if this.au=as.substr(0,ad), this.ab=as.substr(ad+1, al-ad-1), this.ap=ab.length
r59
38}}}{{{#!if (au=="")||(au=="-")||(au=="+")
r125
39.12345 식으로 또는 -.12345 식으로 기입할 경우 upper 값을 0으로 부여합니다.
r57
40{{{#!if au="0"
r51
41}}}}}}}}}{{{#!if ad==-1
r126
42소수점이 존재하지 않을 경우 au 문자열 길이값을 ad로 정의합니다. au의 마지막 문자열 index는 ad-1이 됩니다.
r125
43{{{#!if this.au=as, ab="", ap=0+0, ad=au.length
r48
44}}}}}}{{{#!if bd!=-1
r92
45{{{#!if this.bu=bs.substr(0,bd), this.bb=bs.substr(bd+1, bl-bd-1), this.bp=bb.length
r59
46}}}{{{#!if (bu=="")||(bu=="-")||(bu=="+")
r57
47{{{#!if bu="0"
r48
48}}}}}}}}}{{{#!if bd==-1
r125
49{{{#!if this.bu=bs, bb="", bp=0+0, bd=bu.length
r46
50}}}}}}
r54
51
r207
52##== 유효성 검사 ==
r212
53the seed에서 지원되는 long(integer)가 unsigned였으면 1844경까지 가서 충분히 19자리로 놀 수 있었는데, signed long이므로 922경까지 가능한 공간에서 18자리로 잘라내기를 합니다. (소수점 위 최대 18자리, 소수점 아래 최대 18자리)
r55
54
r207
55(반점(,)을 자동적으로 생략하고 들어가는 것은 나중에 생각하겠습니다.)
r212
56
r218
57{{{#!if (as!=null)&&(bs!=null)
58a와 b 모두 입력되었을 때, br와 ts 변수를 이용하여 순차적으로 검사를 진행합니다. 도중 문제가 있으면 (br를 true로 반환하고) 오류 코드를 내도록 만듭니다. a를 먼저 보며, 소수점 윗부분을 먼저 본 다음 소수점 아랫부분을 봅니다.
r211
59변수 tm와 tn을 가져와 유효성 검사를 실행합니다.
60먼저 소수점을 2개 이상 입력했음이 탐지된다면 오류코드 5번(이중 소수점 표기)을 반환합니다.
61소수점을 입력하면 indexOf와 lastIndexOf는 서로 다른 값을 가리키게 됩니다. 소수점을 입력하지 않았을 경우 indexOf와 lastIndexOf는 -1로 서로 같은 값을 가리키게 됩니다.
r217
62{{{#!if ts=(as.indexOf(".")==as.lastIndexOf(".")),
r211
63}}}{{{#!if !ts&&!br
64{{{#!if br=true, ea=5
65}}}}}}
r209
66
r211
67문제가 없으면 au를 tm으로 복제하고 검사를 계속 합니다.
68앞자리가 마이너스(-)일 경우 이를 잘라냅니다.
69{{{#!if ts&&!br
r215
70{{{#!if tm=au, tm[0]==45
r214
71{{{#!if tm=tm.substr(1)
r215
72}}}}}}
r209
73소수점 윗자릿수가 넘치면 오류코드 1번(오버플로)를 반환합니다.
r211
74{{{#!if ts=(tm.length<=18)
75}}}}}}
76{{{#!if !ts&&!br
r208
77{{{#!if br=true, ea=1
78}}}}}}
r209
79
r244
80의도적으로 00을 적어놓았을 수 있으므로 tm 앞에 숫자 1을 더 붙인 다음, 이를 값으로 바꾼 다음 다시 텍스트 값으로 바꾼 문자열을 tn으로 정의합니다. 중간에 숫자가 아닌 문구가 들어갔다면 숫자가 아닌 문구가 들어간 부분부터 값이 잘려 나오게 됩니다.
r211
81숫자가 아닌 문구를 섞어넣었음이 탐지될 경우 오류코드 6번(소수점 윗자리 오류)을 반환합니다. (반점(,)도 걸릴 수 있습니다.)
r208
82{{{#!if ts&&!br
r211
83{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn)
r208
84}}}}}}
r211
85{{{#!if !ts&&!br
86{{{#!if br=true, ea=6
87}}}}}}
r209
88
r211
89소수점 아래 부분을 검사합니다. 앞에서 소수점 개수를 검사했으므로 소수점 아래 부분에 점(.)이 더 이상 나올 수 없습니다.
90소수점 아래 입력한 자릿수가 19자리를 넘어가면 오류 대신 경고코드 1번(소수점 아래 자릿수 너무 많음)을 반환하고 소수점 아래 자릿수를 최대 18자리로 잘라냅니다. (이하 이상한 문구를 섞어도 이를 계산에 넣지 않게 됩니다.)
r208
91{{{#!if ts&&!br
r211
92{{{#!if ab.length>=19
93{{{#!if wa=1, ab=ab.substr(0,18), ap=18
r199
94}}}}}}
r211
95
r212
96앞에서 소수점 아래 자릿수를 18자 이하로 줄였습니다. 문자열에서 자릿수에 해당하는 index가 비어있다면 해당 문자열의 주소값은 null이 나옵니다. (예:"테스트"[3]==null) 숫자는 문자열 각 자릿수 문자열의 유니코드 값이 null이 아닌 이상 48 이상 57 이하이며, 이를 이용하여 소수점 아래 18자리에 대해 유효성 검사를 합니다.
97{{{#!if ts=(((ab[0]==null)||((ab[0]>=48)&&(ab[0]<=57)))&&((ab[1]==null)||((ab[1]>=48)&&(ab[1]<=57)))&&((ab[2]==null)||((ab[2]>=48)&&(ab[2]<=57)))&&((ab[3]==null)||((ab[3]>=48)&&(ab[3]<=57)))&&((ab[4]==null)||((ab[4]>=48)&&(ab[4]<=57)))&&((ab[5]==null)||((ab[5]>=48)&&(ab[5]<=57)))&&((ab[6]==null)||((ab[6]>=48)&&(ab[6]<=57)))&&((ab[7]==null)||((ab[7]>=48)&&(ab[7]<=57)))&&((ab[8]==null)||((ab[8]>=48)&&(ab[8]<=57)))&&((ab[9]==null)||((ab[9]>=48)&&(ab[9]<=57)))&&((ab[10]==null)||((ab[10]>=48)&&(ab[10]<=57)))&&((ab[11]==null)||((ab[11]>=48)&&(ab[11]<=57)))&&((ab[12]==null)||((ab[12]>=48)&&(ab[12]<=57)))&&((ab[13]==null)||((ab[13]>=48)&&(ab[13]<=57)))&&((ab[14]==null)||((ab[14]>=48)&&(ab[14]<=57)))&&((ab[15]==null)||((ab[15]>=48)&&(ab[15]<=57)))&&((ab[16]==null)||((ab[16]>=48)&&(ab[16]<=57)))&&((ab[17]==null)||((ab[17]>=48)&&(ab[17]<=57))))
r199
98}}}}}}
r211
99소수점 아래 자리에 입력한 부분이 문제가 있으면 오류코드 7번(소수점 아랫자리 오류)를 반환합니다.
r209
100{{{#!if !ts&&!br
r211
101{{{#!if br=true, ea=7
r209
102}}}}}}
103
r212
104이와 같은 방법으로 b도 bu를 tm으로 복제하는 과정을 포함하여 유효성 검사를 실행합니다. 오류코드는 동일합니다.
r213
105a와 b를 각각 진단해야 하므로 br를 false로 초기화합니다.
106{{{#!if br=false, ts=(bs.indexOf(".")==bs.lastIndexOf("."))
107}}}{{{#!if !ts&&!br
r212
108{{{#!if br=true, eb=5
109}}}}}}
110{{{#!if ts&&!br
r215
111{{{#!if tm=bu, tm[0]==45
r214
112{{{#!if tm=tm.substr(1)
r212
113}}}}}}{{{#!if ts=(tm.length<=18)
114}}}}}}{{{#!if !ts&&!br
115{{{#!if br=true, eb=1
116}}}}}}
117{{{#!if ts&&!br
118{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn)
119}}}}}}{{{#!if !ts&&!br
120{{{#!if br=true, eb=6
121}}}}}}
122{{{#!if ts&&!br
123{{{#!if bb.length>=19
124{{{#!if wb=1, bb=bb.substr(0,18), bp=18
125}}}}}}{{{#!if ts=(((bb[0]==null)||((bb[0]>=48)&&(bb[0]<=57)))&&((bb[1]==null)||((bb[1]>=48)&&(bb[1]<=57)))&&((bb[2]==null)||((bb[2]>=48)&&(bb[2]<=57)))&&((bb[3]==null)||((bb[3]>=48)&&(bb[3]<=57)))&&((bb[4]==null)||((bb[4]>=48)&&(bb[4]<=57)))&&((bb[5]==null)||((bb[5]>=48)&&(bb[5]<=57)))&&((bb[6]==null)||((bb[6]>=48)&&(bb[6]<=57)))&&((bb[7]==null)||((bb[7]>=48)&&(bb[7]<=57)))&&((bb[8]==null)||((bb[8]>=48)&&(bb[8]<=57)))&&((bb[9]==null)||((bb[9]>=48)&&(bb[9]<=57)))&&((bb[10]==null)||((bb[10]>=48)&&(bb[10]<=57)))&&((bb[11]==null)||((bb[11]>=48)&&(bb[11]<=57)))&&((bb[12]==null)||((bb[12]>=48)&&(bb[12]<=57)))&&((bb[13]==null)||((bb[13]>=48)&&(bb[13]<=57)))&&((bb[14]==null)||((bb[14]>=48)&&(bb[14]<=57)))&&((bb[15]==null)||((bb[15]>=48)&&(bb[15]<=57)))&&((bb[16]==null)||((bb[16]>=48)&&(bb[16]<=57)))&&((bb[17]==null)||((bb[17]>=48)&&(bb[17]<=57))))
126}}}}}}{{{#!if !ts&&!br
127{{{#!if br=true, eb=7
r218
128}}}}}}}}}
r211
129
r209
130##== 2차 초기화 ==
r303
131유효성 검사가 종료되었으면 ts와 br를 false로 초기화합니다 유효성 검사에 쓰인 tm과 tn 값을 빈 문자열 값으로 초기화합니다.
132{{{#!if tm="", tn="", ts=false, br=false
r286
133}}}
134
r209
135입력한 소수점 아래에 입력한 값을 정리합니다. 이에 따라 ap, bp값도 다시 조정됩니다.
r223
136{{{#!if (ap>9)&&(ab.substr(ap-9,9)=="000000000")
r221
137{{{#!if ab=ab.substr(0,ap-9), ap=ap-9
r209
138}}}}}}
r223
139{{{#!if (ap>4)&&(ab.substr(ap-4,4)=="0000")
r209
140{{{#!if ab=ab.substr(0,ap-4), ap=ap-4
141}}}}}}
r223
142{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
143{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
144}}}}}}
r223
145{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
146{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
147}}}}}}
r223
148{{{#!if (ap>1)&&(ab.substr(ap-1,1)=="0")
r209
149{{{#!if ab=ab.substr(0,ap-1), ap=ap-1
150}}}}}}
r223
151{{{#!if (bp>9)&&(bb.substr(bp-9,9)=="000000000")
r221
152{{{#!if bb=bb.substr(0,bp-9), bp=bp-9
r209
153}}}}}}
r223
154{{{#!if (bp>4)&&(bb.substr(bp-4,4)=="0000")
r209
155{{{#!if bb=bb.substr(0,bp-4), bp=bp-4
156}}}}}}
r223
157{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
158{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
159}}}}}}
r223
160{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
161{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
162}}}}}}
r223
163{{{#!if (bp>1)&&(bb.substr(bp-1,1)=="0")
r209
164{{{#!if bb=bb.substr(0,bp-1), bp=bp-1
165}}}}}}
r207
166
r303
167그 다음 --앞자리에 0만 여러 개 적어놓고 장난치는 사람이 있을까봐-- au를 값으로 바꾼 다음 다시 문자열로 변환하여 앞자리에 있는 0들을 모두 삭제합니다. bu도 그렇게 둡니다.
168{{{#!if au=+au, au=au.toString(), bu=+bu, bu=bu.toString()
r231
169}}}
170
r305
171이 상태의 au를 ma로 저장하고 ab가 빈 문자열이 아니라면 ab도 ma에 저장합니다. 같은 방법으로 bu, bb을 mb에 저장합니다.
172{{{#!if ma=au, (ad!=-1)&&(ab!="")
r319
173a가 소수점 윗부분이 0이 되는 음수인 경우 "-0"으로 저장된 문자열은 정수값으로 바꿀 때 0이 되므로 ma앞에 -를 붙입니다.
174{{{#!if ma+="."+ab, (+au==0)&&(as[0]==45)
175{{{#!if ma="-"+ma
176}}}}}}}}}
r305
177{{{#!if mb=bu, (bd!=-1)&&(bb!="")
r319
178{{{#!if mb+="."+bb, (+bu==0)&&(bs[0]==45)
179{{{#!if mb="-"+mb
180}}}}}}}}}
r303
181
r207
182##== 덧셈, 뺄셈 ==
r66
183덧셈과 뺄셈 계산과정을 적어봅니다.
184{{{#!if (f=="+")||(f=="-")
r76
185
186a과 b의 소수점 윗부분은 정수이므로 쉽게 계산할 수 있습니다.
187{{{#!if f=="+"
188{{{#!if ru=(+au)+(+bu)
189}}}}}}
190{{{#!if f=="-"
191{{{#!if ru=(+au)-(+bu)
192}}}}}}
193
r125
194a와 b 모두가 정수이면 ap==0, bp==0이 되며, 이런 경우에는 소수점 아래 자릿수를 검산할 필요가 없습니다. a와 b 중 소수점 아래 자릿수가 있는 수가 있을 때에만 소수점 윗자리의 계산값이 얼마가 나오느냐를 보면서 소수점 아래의 자릿수를 정리하는 과정이 의미가 있습니다.
r76
195{{{#!if (ap>0)||(bp>0)
r142
196만약 소수점 아래를 계산한다면 자릿수를 똑같이 맞춰야 의미가 있으므로, 자릿수가 다른 경우 자릿수가 같게 만드는 과정을 먼저 거칩니다. 이를테면 a의 소수점 자릿수가 b의 소수점 자릿수보다 많으면 b뒤에 0을 더 추가하는 방식으로 변경합니다. b 자체가 정수여도 앞에 (소수점이 없을 경우) 이미 bb="", bp=0+0으로 초기화했으므로 동작될 것입니다.
197소수점 아래 최대 18자리까지의 수를 취급하므로 최대 18칸 차이가 나게 됩니다.
198○○○○○○○○○□□□□○○□□○ 과 같이 9칸, 4칸, 2칸, 2칸, 1칸씩 차이가 나면 그 정도를 보정하게 됩니다.
199ap>bp에서 ap-bp>0이 됩니다. ap-bp는 곧 ap가 bp보다 몇 칸만큼 더 많은지를 나타냅니다.
r161
200{{{#!if ap>bp
r228
201{{{#!if bp=ap, bb+=pd
r161
202}}}{{{#!if bb=bb.substr(0,ap)
r66
203}}}}}}
r67
204
205반대로 b의 소수점 자릿수가 많은 경우도 있습니다.
r161
206{{{#!if bp>ap
r228
207{{{#!if ap=bp, ab=ab+pd
r161
208}}}{{{#!if ab=ab.substr(0,bp)
r67
209}}}}}}
r161
210
r71
211위의 과정을 거치게 되면 소수점 아래 최대 자릿수를 똑같이 맞춘 상태에서 계산하게 되므로 ap==bp가 됩니다.
r66
212
r71
213a가 음수인 경우 소수점 아래 값은 순 숫자만 표기된 상태이므로 양수 취급으로 되지 않게 소수점 아래 값인 ab에 음수 표기를 남깁니다.
r68
214{{{#!if as[0]==45
215{{{#!if ab="-"+ab
216}}}}}}
r123
217마찬가지로 b가 음수인 경우 b의 소수점 아래 값은 음수이므로 소수점 아래 값인 bb에 음수 표기를 남깁니다. 10을 소수점 아래 자릿수만큼 제곱한 값으로 저장합니다.
r68
218{{{#!if bs[0]==45
219{{{#!if bb="-"+bb
220}}}}}}
221
r76
222이때 rb를 계산합니다.
r65
223{{{#!if f=="+"
r76
224{{{#!if rb=(+ab)+(+bb)
r65
225}}}}}}
226{{{#!if f=="-"
r76
227{{{#!if rb=(+ab)-(+bb)
r65
228}}}}}}
r75
229
r69
230소수점 아래끼리 더한 자릿수가 얼마나 되는지 보기 위해 rb를 문자열로 바꿉니다.
r86
231이 때 rb가 0이 아닐 경우에만 문자열로 변환합니다.
232{{{#!if (+rb>0)||(+rb<0)
r69
233{{{#!if this.rb=rb.toString()
234}}}
r71
235문자열로 된 rb의 길이를 rp로 정의합니다.
r69
236{{{#!if this.rp=rb.length
237}}}
r86
238}}}
r94
239
r73
240rb가 음수이면 rb의 첫번째(0번 index)의 문자열에는 마이너스(-)가 들어갑니다. 이 때는 rp를 rb의 마이너스 문자열을 세지 않은 자릿수가 되도록 앞에서 정의했던 rb.length에서 1만큼 줄여 정의합니다. ap, bp는 마이너스를 붙이기 전에 값이 고정되어 있으므로 rp처럼 줄일 필요가 없습니다.
r69
241{{{#!if rb[0]==45
r70
242{{{#!if rp=rp-1
r69
243}}}}}}
r57
244
r94
245ru값이 어떤지 보고 각 경우 rb값이 어떠한가에 따라 rb만 정리하거나 rb와 ru 모두 정리합니다.
r149
246중복 처리를 막기 위해 초기화된 ps 변수 하나를 가져옵니다.
r111
247
248소수점 아래 값의 부호와 소수점 위의 값의 부호가 서로 다른 경우 계산을 하기 위해 값을 하나 정의합니다.
249
r235
250{{{#!if tv=+(("1"+pd).substr(0,ap+1))
r162
251}}}
r111
252
r75
253Case 1 : ru가 0보다 큰 경우
r71
254ru는 정수이므로 ru가 0보다 크면 곧 ru는 1 이상의 정수이며, 1 이상이면 a+b 또는 a-b가 양수+음수 꼴이 되더라도 소수점 아래 정리를 하면 됩니다. rb를 정리하는 과정에서 ru에서 1을 빌려오거나 ru에 1이 더해질 수도 있습니다. 앞에서 rb를 string으로 바꿨으므로 +rb를 다룹니다.
r65
255{{{#!if ru>0
r75
256Case 1-1 : rb가 0 이상인 경우
r232
257{{{#!if (+rb>=0)&&!ps
r73
258rb가 소수점 아래 자릿수를 초과하여 소수점 위의 수를 계산하게 생겼다면 ap=bp인 상황에서 rp>ap가 됩니다. rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
r71
259{{{#!if rp>ap
260{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r69
261}}}}}}
r73
262rb가 소수점 아래 자릿수를 초과하지 않을 경우 rb를 다시 정의할 필요 없이 그대로 둡니다.
r71
263{{{#!if rp<=ap
r72
264}}}
r104
265{{{#!if ps=true
r73
266}}}
r104
267}}}
r73
268
r94
269Case 1-2 : rb가 음수인 경우 ru에서 1을 빌려옵니다. 1보다 작은 양수값에서 1보다 작은 양수값을 빼면 -1보다 작을 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
270{{{#!if (+rb<0)&&!ps
r73
271{{{#!if ru=ru-1
272}}}
r111
273소수점 아래 자릿수인 ap만큼 10을 제곱한 값(tv)을 rb에서 증가시켜 rb를 재정의합니다. 그러면 rb는 양수가 됩니다. 그리고 rb를 다시 문자열로 변환합니다.
274{{{#!if rb=tv+(+rb)
r73
275}}}{{{#!if rb=rb.toString()
276}}}
r104
277{{{#!if ps=true
278}}}}}}
r73
279정리과정을 끝냈으면 ru를 string으로 변환합니다.
280{{{#!if this.ru=ru.toString()
r71
281}}}}}}
282
r75
283Case 2 : ru가 0인 경우 ru가 0이 되면 rb의 값이 양수인지 음수인지에 따라 달라집니다.
r65
284{{{#!if ru==0
r75
285Case 2-1 : rb가 0 이상인 경우
r232
286{{{#!if (+rb>=0)&&!ps
r73
287rb가 양수이면서 rb가 자릿수를 초과한 경우 rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
288{{{#!if rp>ap
289{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r104
290}}}}}}
r327
291ru를 string으로 변환합니다.
292{{{#!if ru=ru.toString()
293}}}
294{{{#!if ps=true
295}}}}}}
r75
296Case 2-2 : rb가 음수인 경우
r232
297{{{#!if (+rb<0)&&!ps
r75
298rb가 음수이면서 rb가 자릿수를 초과한 경우 값이 0인 ru에 1을 빼야 합니다. 그리고 rb가 "-"+숫자 꼴이므로 문자열의 1번 index에 해당하는 1을 지워야 합니다. 앞에서 rb가 음수인 경우 rp는 rb의 마이너스(-)가 차지하는 자릿수를 계산하지 않은 값 곧 숫자들이 차지하는 자릿수이므로, rb를 길이가 rp-1인 숫자들로 다시 정의합니다.
r73
299{{{#!if rp>ap
r75
300{{{#!if ru=ru-1, rb=rb.substr(2, rp-1)
301}}}}}}
302rb가 자릿수를 초과하지 않은 경우 rb에서 "-"를 뺀 문자열로 rb를 다시 정의합니다.
r101
303{{{#!if rp<=ap
r76
304{{{#!if rb=rb.substr(1, rp)
r104
305}}}}}}
r327
306ru를 string으로 변환합니다.
307{{{#!if ru=ru.toString()
308}}}
r325
309만일 -0.xxxx 같이 여전히 rb<0이고 ru==0인 상태라면 rb에 생겼던 마이너스 부호를 떼어내 왼쪽으로 붙입니다. ns를 "-"으로 바꿉니다.
r326
310{{{#!if +ru==0
r325
311{{{#!if ns="-"
r324
312}}}}}}
r327
313ru가 음수이면 ru앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
314{{{#!if +ru<0
315{{{#!if ru=ru.substr(1), ns="-"
316}}}}}}
r324
317{{{#!if ps=true
318}}}}}}
r65
319}}}
r74
320
r75
321Case 3 : ru가 0보다 작은 경우. 곧 -1 이하인 음수가 되는 경우.
r65
322{{{#!if ru<0
r76
323Case 3-1 : rb가 0 이하인 경우
r232
324{{{#!if (+rb<=0)&&!ps
r76
325rb가 음수이면서 자릿수를 초과한 경우 ru에 -1을 빼고, rb의 음수기호(-)와 첫번째 숫자인 문자열 "1"을 뺀 문자열로 rb를 다시 정의합니다.
326{{{#!if rp>ap
r80
327{{{#!if rb=rb.substr(2, rp-1)
r65
328}}}
r80
329}}}
r107
330rb가 자릿수를 초과하지 않은 경우 rp는 음수기호를 제외한 숫자 자릿수이므로 rb를 음수기호만을 뺀 문자열로 다시 정의합니다. 단, rb가 0이 되면 rp==1이 되므로 rb==0인 경우는 제외합니다.
r101
331{{{#!if (rp<=ap)&&(+rb<0)
r106
332{{{#!if rb=rb.substr(1, rp)
r104
333}}}}}}{{{#!if ps=true
334}}}}}}
r82
335Case 3-2 : rb가 0보다 큰 경우. 소수점 아래 부분을 보면 -1보다 큰 음수값에서 -1보다 큰 음수값을 빼면 1보다 클 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
336{{{#!if (+rb>0)&&!ps
r82
337ru<=-1이므로 ru+1를 해도 최대 0이 됩니다.
338{{{#!if ru=ru+1
r75
339}}}
r111
340rb>0에서 rb은 음수(계산결과)의 음수(마이너스값이 줄어듦)이므로 rb의 자릿수인 rp만큼 10을 제곱한 값(tv)에서 rb을 '''뺀''' 값으로 rb를 재정의합니다. 그러면 rb는 양수이지만 계산결과인 음수에 맞춘 값이 됩니다. 그리고 rb를 다시 문자열로 변환합니다. 변환합니다.
341{{{#!if rb=tv-(+rb)
r82
342}}}{{{#!if rb=rb.toString()
r104
343}}}{{{#!if ps=true
344}}}}}}
r76
345정리과정을 끝냈으면 ru를 string으로 변환합니다.
346{{{#!if this.ru=ru.toString()
347}}}
r325
348-0.xxxx 같이 (ru==0인데) 연산결과가 -1보다 큰 음수로 나오는 경우가 있으므로 ru 앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
r326
349{{{#!if +ru<0
r325
350{{{#!if ru=ru.substr(1), ns="-"
r326
351}}}}}}
352{{{#!if +ru==0
353{{{#!if ns="-"
354}}}}}}
r76
355}}}
356여기까지가 소수점 아래 자릿수 숫자들의 계산과정입니다.
357}}}
r71
358
r94
359a와 b 모두 정수인 경우 ap, bp는 모두 0이 되므로 ru만을 그대로 문자열로 바꾸면 되며 소수점 아래(rb)는 표기해야 할 필요가 없으므로 rb="", (소수점 아래 자릿수)rp=0을 반환합니다.
360{{{#!if (ap==0)&&(bp==0)
361{{{#!if this.ru=ru.toString(), rb="", rp=0+0
362}}}}}}
363
r95
364rb==0인 경우 rb="", rp=0을 반환합니다.
365{{{#!if +rb==0
366{{{#!if rb="", rp=0+0
367}}}}}}
368
r99
369이제 rb=""이 아닌 경우 소수점 아래 숫자 정리를 합니다.
370rp를 rb의 문자열 길이로 다시 정의합니다.
r97
371{{{#!if rb!=""
372{{{#!if this.rp=rb.length
r103
373}}}
r97
374
r99
375+"000100"을 숫자로 바꾸면 100이 되는 문제가 있습니다. 이처럼 소수점 아래 자릿수를 연산한 결과를 문자열로 바꿨을 때 기존 소수점 아래 자릿수보다 작은 길이가 나오면 앞쪽에 0을 보충합니다.
376앞에서 ap,bp를 똑같이 맞췄으므로 ap를 가져옵니다. 자릿수가 모자랄 경우 0을 하나씩 보충합니다.
377{{{#!if rp<ap
r228
378{{{#!if rb=pd.substr(0,ap-rp)+rb
r99
379}}}}}}
380
381앞에 0을 채웠다면 이제, 소수점 아래로 나오는 숫자를 보고 마지막에서부터 0이 나오면 한 자리씩 지우는 과정을 시작합니다.
382
r164
383여기까지가 덧셈 또는 뺄셈연산의 계산과정이며 과정은 이후 rb 정리 과정으로 넘어갑니다.
r166
384}}}}}}
r76
385
r259
386##== 곱셈 & 나눗셈 ==
387##=== 숫자 초기화 ===
r186
388{{{#!if (f=="*")||(f=="/")
389곱셈 및 나눗셈 연산과정을 봅니다.
r64
39018자리 숫자로 입력할 수 있는 최대 정수는 999,999,999,999,999,999입니다.
391다행히 999,999,999,999,999,999*9=8,999,999,999,999,999,991 < long 한계치 9,223,372,036,854,775,807 이라서 a*각 자릿수로 덧셈해볼 수는 있습니다.
r120
392
r303
393a 또는 b가 음수가 될 경우 as 또는 bs 문자열은 "-" 기호가 붙으므로, 이것을 이용한 조건문을 하나 만들어 a와 b 둘의 부호가 서로 다를 경우 (a만 음수이거나 b가 음수일 경우) 계산 결과에 부호를 표시할 수 있게 만듭니다.
r293
394{{{#!if (as[0]==45)^(bs[0]==45)
r159
395{{{#!if ns="-"
396}}}}}}
r126
397a 또는 b가 음수가 될 경우 소수점 윗부분 문자열인 au 또는 bu에서 마이너스(-)를 제거합니다.
398{{{#!if au[0]==45
399{{{#!if au=au.substr(1,ad-1)
400}}}}}}
401{{{#!if bu[0]==45
402{{{#!if bu=bu.substr(1,bd-1)
403}}}}}}
404
r259
405##=== 자릿수 측정 ===
406나누는 자릿수에 맞춰 결과를 표시하고자 ac, bc를 자릿수를 나타내는 값으로 정의합니다.
407먼저 au는 앞에 적어놓은 0을 제거한 문자열이므로 +au>0인 경우 ac를 au의 문자열 길이에서 1을 뺀 값으로 정의합니다.
408{{{#!if +au>0
409{{{#!if ac=au.length-1
410}}}}}}
r302
411(au, ab 둘다 0인 경우 앞에 처리하는 식이 있고, au, ab 둘 중 하나라도 0이 아닐 때) au가 0이라면 ab는 단순 정수값으로 옮겼을 때 0보다 큰 값이 나옵니다. 소수점 아래 처음으로 0이 아닌 수가 나오는 자릿수를 구한 다음 덧셈 연산에서 그 수의 역원이 되는 수를 ac로 정의합니다. 이를 구하고자 ab의 뒤에 0을 더 붙여 18자리 숫자로 만든 다음 정수로 바꾸어 구합니다.
r259
412{{{#!if +au==0
413{{{#!if ac=ab+pd, ac=ac.substr(0,18), ac=+ac, ac=ac.toString(), ac=ac.length-19
414}}}}}}
r207
415
r259
416bc도 a와 같은 방법으로 정의합니다.
417{{{#!if +bu>0
418{{{#!if bc=bu.length-1
419}}}}}}{{{#!if +bu==0
420{{{#!if bc=bb+pd, bc=bc.substr(0,18), bc=+bc, bc=bc.toString(), bc=bc.length-19
421}}}}}}
422
423##=== 0인자 처리 ===
r186
424a 또는 b값이 0이 되려면 au, ab 둘 다 0이 되거나 bu, bb 둘 다 0이 되어야 합니다. a 또는 b 값이 0일 경우 당연히 음수 부호가 표시되지 않습니다.
r174
425{{{#!if ((+au==0)&&(+ab==0))||((+bu==0)&&(+bb==0))
r190
426곱셈에서 0을 곱하면 0이 되므로, 곱셈의 경우 a 또는 b가 0이 될 때 계산 결과에 0을 반환합니다.
427{{{#!if f=="*"
r159
428{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
r133
429}}}}}}
r190
430나눗셈에서 나누는 수(b)가 0이 될 경우 오류를 반환하고 ps=true를 걸어 나눗셈 연산이 되지 않게 만듭니다.
431{{{#!if f=="/"
432{{{#!if ((+bu==0)&&(+bb==0))
433error code 03 번 : 0으로 나눌 수 없습니다.
434{{{#!if eb=03, ps=true
435}}}}}}
436나누는 수가 0이 아니면서 나눌 대상이 0이 될 경우 곱셈에서 0을 곱하는 것처럼 계산 결과에 0을 반환합니다.
437{{{#!if ((+au==0)&&(+ab==0))&&((+bu!=0)||(+bb!=0))
438{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
439}}}}}}
r224
440}}}}}}
r198
441곱셈과 나눗셈에서 a와 b 모두 0이 아닌 경우를 봅니다.
r133
442{{{#!if ((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
443
r264
444##=== 3차 초기화 ===
r203
445{{{#!if f=="*"
446곱셈계산에서 18자리씩 곱셈을 할 수 있도록 입력했던 a와 b의 문자열을 확장할 것입니다.
r198
447
r124
448a와 b 각각 소수점 윗자리와 소수점 아래자리의 문자열의 빈 공간을 0으로 채워 18자로 만듭니다.
449소수점 윗자리는 왼쪽에서 0을 채워나갑니다.
r228
450{{{#!if au = pd + au
r172
451+18자}}}{{{#!if au=au.substr(au.length-18,18)
r145
452}}}
r228
453{{{#!if bu = pd + bu
r172
454+18자}}}{{{#!if bu=bu.substr(bu.length-18,18)
r145
455}}}
r124
456
457소수점 아래자리는 오른쪽에서 0을 채웁니다. (ap, bp값은 보존됩니다.)
r228
458{{{#!if ab += pd
r145
459+18자}}}{{{#!if ab=ab.substr(0,18)
460}}}
r228
461{{{#!if bb += pd
r145
462+18자}}}{{{#!if bb=bb.substr(0,18)
r191
463}}}}}}
r203
464
465{{{#!if f=="/"
r204
466나눗셈은 소수점 위 18번째 자리부터 내려가면서 처음으로 0이 아닌 숫자가 있으면 그 숫자가 처음 숫자가 되도록 숫자를 왼쪽으로 밀어두려고 합니다. 그 다음 오른쪽을 0으로 채웁니다.
r267
467
468a에서 au가 0인 경우 18자리 au를 18자리 ab로 바꾸고 ab를 18자의 0(pd)으로 채웁니다.
469소수점 아래 자리를 매겼던 ab가 소수점 위인 au자리로 옮겨지게 되므로 정수로 바꾸었다 다시 문자열로 바꿈으로써 왼쪽에 불필요하게 붙어있는 0을 삭제합니다.
470{{{#!if +au==0
471{{{#!if au=ab, ab=pd, au=+au, au=au.toString()
472}}}}}}
473
r206
474au를 왼쪽으로 밀 경우 남게 되는 자릿수를 변수 tu로 둡니다. (후술할 아래 곱셈연산과 겹치지 않습니다.)
r228
475{{{#!if tu=18-au.length, au=au+ab.substr(0,tu)+pd, ab=ab.substr(tu)+pd, au=au.substr(0,18), ab=ab.substr(0,18)
r203
476}}}
r267
477
478b도 a와 같은 방법으로 초기화합니다.
479{{{#!if +bu==0
480{{{#!if bu=bb, bb=pd, bu=+bu, bu=bu.toString()
481}}}}}}
r228
482{{{#!if tu=18-bu.length, bu=bu+bb.substr(0,tu)+pd, bb=bb.substr(tu)+pd, bu=bu.substr(0,18), bb=bb.substr(0,18)
r203
483}}}
r207
484
r203
485}}}
r204
486}}}
r190
487여기까지 곱셈 또는 나눗셈에서 숫자를 초기화하는 과정입니다.
r224
488}}}
r133
489
r264
490##=== 곱셈 ===
r190
491a와 b 모두 0이 아닌 경우에서 곱셈을 연산하는 과정입니다.
492{{{#!if (f=="*")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
r149
493곱셈은 18자리를 끊어서 계산합니다. 소수점 아래 18자리의 아래인 제19~36번 자리를 ri로 둡니다. 소수점 위 19~36번째 자리는 rs로 두어 ri, rb, ru, rs 순으로 계산합니다.
r204
494소수점 위 18자리, 소수점 아래 18자리인 두 수를 곱하면 해당하는 자리별로 곱셈을 할 때 최대 (18+18)**2=1296회를 곱해야 합니다.
r135
495
r147
496앞으로 있을 계산은 다음과 같습니다.
r135
497 * ri를 더했더니 ri가 19자리 숫자로 넘치면 넘친 앞의 1자리를 rb로 넘깁니다.
r147
498 * rb가 19자리로 넘쳤다면 넘친 앞의 1자리를 ru로 넘깁니다.
499 * ru가 19자리로 넘친다면 넘친 앞의 1자리를 rs로 넘깁니다.
r135
500(rs는 상용로그로 보았을 때 log a<18, log b<18 에서 log (a*b) = log a + log b < 36이므로 19자리로 넘치지 않습니다.)
501문자열로 바꾸고 문자열을 쪼갠 다음 숫자로 바꾸는 과정입니다. 이를 if로 바꾸면 다음과 같습니다.
r149
502{{{#!if false
r135
503{{{#!if ri=ri.toString(), ri.length==19
r249
504{{{#!if rb=(+rb)+(+ri.substr(0,1)), ri=(+ri.substr(1,18))
r135
505}}}}}}
506{{{#!if rb=rb.toString(), rb.length==19
r249
507{{{#!if ru=(+ru)+(+rb.substr(0,1)), rb=(+rb.substr(1,18))
r135
508}}}}}}
509{{{#!if ru=ru.toString(), ru.length==19
r249
510{{{#!if rs=(+rs)+(+ru.substr(0,1)), ru=(+ru.substr(1,18))
r135
511}}}}}}
r149
512}}}
r151
513변수 tv, tw, i, ps를 가져옵니다. tw는 0, tv는 1, i는 0, ps는 false으로 초기화 된 채로 있습니다. 연산 과정 중간중간에 마지막 자릿수를 보정하고자 10씩 곱하게 됩니다. ri에서 최대 18자리에서 1자리 수를 곱하면 19자리가 될 수 있으므로 곱셈할 때마다 19자리로 넘칠때마다 넘치는 숫자는 rb로 넘깁니다.
r153
514ri부분을 합산합니다. ab*bb 의 절반을 처리합니다. (자릿수끼리 대입했을 때 처리되는 부분이 먼저 입력한 절반이 나중에 입력하는 절반보다 더 많지만, 편의상 절반이라고 적습니다.)
r149
515## for i=0 to 17
r151
516{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
517}}}{{{#!if tw=tw.toString(), tw.length==19
r150
518{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
519}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
520{{{#!if ri=ri+(+tw)
r150
521}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
522{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
523}}}}}}{{{#!if (ri.length<=18)&&!ps
r150
524{{{#!if ri=(+ri)
r222
525}}}}}}{{{#!if i+=1, tv*=10, ps=false
r149
526}}}
r151
527## i=1
528{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
529}}}{{{#!if tw=tw.toString(), tw.length==19
r151
530{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
531}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
532{{{#!if ri=ri+(+tw)
r151
533}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
534{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
535}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
536{{{#!if ri=(+ri)
r222
537}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
538}}}
539## i=2
540{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
541}}}{{{#!if tw=tw.toString(), tw.length==19
r151
542{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
543}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
544{{{#!if ri=ri+(+tw)
r151
545}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
546{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
547}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
548{{{#!if ri=(+ri)
r222
549}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
550}}}
551## i=3
552{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
553}}}{{{#!if tw=tw.toString(), tw.length==19
r151
554{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
555}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
556{{{#!if ri=ri+(+tw)
r151
557}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
558{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
559}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
560{{{#!if ri=(+ri)
r222
561}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
562}}}
563## i=4
564{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
565}}}{{{#!if tw=tw.toString(), tw.length==19
r151
566{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
567}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
568{{{#!if ri=ri+(+tw)
r151
569}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
570{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
571}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
572{{{#!if ri=(+ri)
r222
573}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
574}}}
575## i=5
576{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
577}}}{{{#!if tw=tw.toString(), tw.length==19
r151
578{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
579}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
580{{{#!if ri=ri+(+tw)
r151
581}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
582{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
583}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
584{{{#!if ri=(+ri)
r222
585}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
586}}}
587## i=6
588{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
589}}}{{{#!if tw=tw.toString(), tw.length==19
r151
590{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
591}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
592{{{#!if ri=ri+(+tw)
r151
593}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
594{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
595}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
596{{{#!if ri=(+ri)
r222
597}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
598}}}
599## i=7
600{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
601}}}{{{#!if tw=tw.toString(), tw.length==19
r151
602{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
603}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
604{{{#!if ri=ri+(+tw)
r151
605}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
606{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
607}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
608{{{#!if ri=(+ri)
r222
609}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
610}}}
611## i=8
612{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
613}}}{{{#!if tw=tw.toString(), tw.length==19
r151
614{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
615}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
616{{{#!if ri=ri+(+tw)
r151
617}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
618{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
619}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
620{{{#!if ri=(+ri)
r222
621}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
622}}}
623## i=9
624{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
625}}}{{{#!if tw=tw.toString(), tw.length==19
r151
626{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
627}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
628{{{#!if ri=ri+(+tw)
r151
629}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
630{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
631}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
632{{{#!if ri=(+ri)
r222
633}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
634}}}
635## i=10
636{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
637}}}{{{#!if tw=tw.toString(), tw.length==19
r151
638{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
639}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
640{{{#!if ri=ri+(+tw)
r151
641}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
642{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
643}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
644{{{#!if ri=(+ri)
r222
645}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
646}}}
647## i=11
648{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
649}}}{{{#!if tw=tw.toString(), tw.length==19
r151
650{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
651}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
652{{{#!if ri=ri+(+tw)
r151
653}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
654{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
655}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
656{{{#!if ri=(+ri)
r222
657}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
658}}}
659## i=12
660{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
661}}}{{{#!if tw=tw.toString(), tw.length==19
r151
662{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
663}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
664{{{#!if ri=ri+(+tw)
r151
665}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
666{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
667}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
668{{{#!if ri=(+ri)
r222
669}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
670}}}
671## i=13
672{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
673}}}{{{#!if tw=tw.toString(), tw.length==19
r151
674{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
675}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
676{{{#!if ri=ri+(+tw)
r151
677}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
678{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
679}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
680{{{#!if ri=(+ri)
r222
681}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
682}}}
683## i=14
684{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
685}}}{{{#!if tw=tw.toString(), tw.length==19
r151
686{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
687}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
688{{{#!if ri=ri+(+tw)
r151
689}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
690{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
691}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
692{{{#!if ri=(+ri)
r222
693}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
694}}}
695## i=15
696{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
697}}}{{{#!if tw=tw.toString(), tw.length==19
r151
698{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
699}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
700{{{#!if ri=ri+(+tw)
r151
701}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
702{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
703}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
704{{{#!if ri=(+ri)
r222
705}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
706}}}
707## i=16
708{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
709}}}{{{#!if tw=tw.toString(), tw.length==19
r151
710{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
711}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
712{{{#!if ri=ri+(+tw)
r151
713}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
714{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
715}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
716{{{#!if ri=(+ri)
r222
717}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
718}}}
719## i=17
720{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
721}}}{{{#!if tw=tw.toString(), tw.length==19
r151
722{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
723}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
724{{{#!if ri=ri+(+tw)
r151
725}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
726{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
727}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
728{{{#!if ri=(+ri)
729}}}}}}
r134
730
r151
731##rb
r184
732rb부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bb의 나머지 절반 + au*bb의 절반), ab*bu의 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r151
733{{{#!if i=0+0, tv=1, ps=false
734}}}
735##for i=0 to 17
r185
736{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
737}}}{{{#!if tw=tw.toString(), tw.length==19
r152
738{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
739}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
740{{{#!if rb=rb+(+tw)
r152
741}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
742{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
743}}}}}}{{{#!if (rb.length<=18)&&!ps
r152
744{{{#!if rb=(+rb)
745}}}}}}
r176
746{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
747}}}{{{#!if tw=tw.toString(), tw.length==19
r152
748{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
749}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
750{{{#!if rb=rb+(+tw)
r152
751}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
752{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
753}}}}}}{{{#!if (rb.length<=18)&&!ps
r152
754{{{#!if rb=(+rb)
r222
755}}}}}}{{{#!if i+=1, tv*=10, ps=false
r152
756}}}
r153
757## i=1
r185
758{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
759}}}{{{#!if tw=tw.toString(), tw.length==19
r153
760{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
761}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
762{{{#!if rb=rb+(+tw)
r153
763}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
764{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
765}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
766{{{#!if rb=(+rb)
767}}}}}}
r176
768{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
769}}}{{{#!if tw=tw.toString(), tw.length==19
r153
770{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
771}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
772{{{#!if rb=rb+(+tw)
r153
773}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
774{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
775}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
776{{{#!if rb=(+rb)
r222
777}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
778}}}
779## i=2
r185
780{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
781}}}{{{#!if tw=tw.toString(), tw.length==19
r153
782{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
783}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
784{{{#!if rb=rb+(+tw)
r153
785}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
786{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
787}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
788{{{#!if rb=(+rb)
789}}}}}}
r176
790{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
791}}}{{{#!if tw=tw.toString(), tw.length==19
r153
792{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
793}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
794{{{#!if rb=rb+(+tw)
r153
795}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
796{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
797}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
798{{{#!if rb=(+rb)
r222
799}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
800}}}
801## i=3
r185
802{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
803}}}{{{#!if tw=tw.toString(), tw.length==19
r153
804{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
805}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
806{{{#!if rb=rb+(+tw)
r153
807}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
808{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
809}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
810{{{#!if rb=(+rb)
811}}}}}}
r176
812{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
813}}}{{{#!if tw=tw.toString(), tw.length==19
r153
814{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
815}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
816{{{#!if rb=rb+(+tw)
r153
817}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
818{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
819}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
820{{{#!if rb=(+rb)
r222
821}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
822}}}
823## i=4
r185
824{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
825}}}{{{#!if tw=tw.toString(), tw.length==19
r153
826{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
827}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
828{{{#!if rb=rb+(+tw)
r153
829}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
830{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
831}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
832{{{#!if rb=(+rb)
833}}}}}}
r176
834{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
835}}}{{{#!if tw=tw.toString(), tw.length==19
r153
836{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
837}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
838{{{#!if rb=rb+(+tw)
r153
839}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
840{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
841}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
842{{{#!if rb=(+rb)
r222
843}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
844}}}
845## i=5
r185
846{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
847}}}{{{#!if tw=tw.toString(), tw.length==19
r153
848{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
849}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
850{{{#!if rb=rb+(+tw)
r153
851}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
852{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
853}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
854{{{#!if rb=(+rb)
855}}}}}}
r176
856{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
857}}}{{{#!if tw=tw.toString(), tw.length==19
r153
858{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
859}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
860{{{#!if rb=rb+(+tw)
r153
861}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
862{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
863}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
864{{{#!if rb=(+rb)
r222
865}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
866}}}
867## i=6
r185
868{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
869}}}{{{#!if tw=tw.toString(), tw.length==19
r153
870{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
871}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
872{{{#!if rb=rb+(+tw)
r153
873}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
874{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
875}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
876{{{#!if rb=(+rb)
877}}}}}}
r176
878{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
879}}}{{{#!if tw=tw.toString(), tw.length==19
r153
880{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
881}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
882{{{#!if rb=rb+(+tw)
r153
883}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
884{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
885}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
886{{{#!if rb=(+rb)
r222
887}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
888}}}
889## i=7
r185
890{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
891}}}{{{#!if tw=tw.toString(), tw.length==19
r153
892{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
893}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
894{{{#!if rb=rb+(+tw)
r153
895}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
896{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
897}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
898{{{#!if rb=(+rb)
899}}}}}}
r176
900{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
901}}}{{{#!if tw=tw.toString(), tw.length==19
r153
902{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
903}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
904{{{#!if rb=rb+(+tw)
r153
905}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
906{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
907}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
908{{{#!if rb=(+rb)
r222
909}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
910}}}
911## i=8
r185
912{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
913}}}{{{#!if tw=tw.toString(), tw.length==19
r153
914{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
915}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
916{{{#!if rb=rb+(+tw)
r153
917}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
918{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
919}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
920{{{#!if rb=(+rb)
921}}}}}}
r176
922{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
923}}}{{{#!if tw=tw.toString(), tw.length==19
r153
924{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
925}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
926{{{#!if rb=rb+(+tw)
r153
927}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
928{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
929}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
930{{{#!if rb=(+rb)
r222
931}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
932}}}
933## i=9
r185
934{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
935}}}{{{#!if tw=tw.toString(), tw.length==19
r153
936{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
937}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
938{{{#!if rb=rb+(+tw)
r153
939}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
940{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
941}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
942{{{#!if rb=(+rb)
943}}}}}}
r176
944{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
945}}}{{{#!if tw=tw.toString(), tw.length==19
r153
946{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
947}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
948{{{#!if rb=rb+(+tw)
r153
949}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
950{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
951}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
952{{{#!if rb=(+rb)
r222
953}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
954}}}
955## i=10
r185
956{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
957}}}{{{#!if tw=tw.toString(), tw.length==19
r153
958{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
959}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
960{{{#!if rb=rb+(+tw)
r153
961}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
962{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
963}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
964{{{#!if rb=(+rb)
965}}}}}}
r176
966{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
967}}}{{{#!if tw=tw.toString(), tw.length==19
r153
968{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
969}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
970{{{#!if rb=rb+(+tw)
r153
971}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
972{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
973}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
974{{{#!if rb=(+rb)
r222
975}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
976}}}
977## i=11
r185
978{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
979}}}{{{#!if tw=tw.toString(), tw.length==19
r153
980{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
981}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
982{{{#!if rb=rb+(+tw)
r153
983}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
984{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
985}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
986{{{#!if rb=(+rb)
987}}}}}}
r176
988{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
989}}}{{{#!if tw=tw.toString(), tw.length==19
r153
990{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
991}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
992{{{#!if rb=rb+(+tw)
r153
993}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
994{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
995}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
996{{{#!if rb=(+rb)
r222
997}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
998}}}
999## i=12
r185
1000{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1001}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1002{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1003}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1004{{{#!if rb=rb+(+tw)
r153
1005}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1006{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1007}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1008{{{#!if rb=(+rb)
1009}}}}}}
r176
1010{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1011}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1012{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1013}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1014{{{#!if rb=rb+(+tw)
r153
1015}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1016{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1017}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1018{{{#!if rb=(+rb)
r222
1019}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1020}}}
1021## i=13
r185
1022{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1023}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1024{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1025}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1026{{{#!if rb=rb+(+tw)
r153
1027}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1028{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1029}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1030{{{#!if rb=(+rb)
1031}}}}}}
r176
1032{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1033}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1034{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1035}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1036{{{#!if rb=rb+(+tw)
r153
1037}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1038{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1039}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1040{{{#!if rb=(+rb)
r222
1041}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1042}}}
1043## i=14
r185
1044{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1045}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1046{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1047}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1048{{{#!if rb=rb+(+tw)
r153
1049}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1050{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1051}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1052{{{#!if rb=(+rb)
1053}}}}}}
r176
1054{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1055}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1056{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1057}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1058{{{#!if rb=rb+(+tw)
r153
1059}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1060{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1061}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1062{{{#!if rb=(+rb)
r222
1063}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1064}}}
1065## i=15
r185
1066{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1067}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1068{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1069}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1070{{{#!if rb=rb+(+tw)
r153
1071}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1072{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1073}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1074{{{#!if rb=(+rb)
1075}}}}}}
r176
1076{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1077}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1078{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1079}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1080{{{#!if rb=rb+(+tw)
r153
1081}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1082{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1083}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1084{{{#!if rb=(+rb)
r222
1085}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1086}}}
1087## i=16
r185
1088{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1089}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1090{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1091}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1092{{{#!if rb=rb+(+tw)
r153
1093}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1094{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1095}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1096{{{#!if rb=(+rb)
1097}}}}}}
r176
1098{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1099}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1100{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1101}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1102{{{#!if rb=rb+(+tw)
r153
1103}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1104{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1105}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1106{{{#!if rb=(+rb)
r222
1107}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1108}}}
1109## i=17
r185
1110{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1111}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1112{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1113}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1114{{{#!if rb=rb+(+tw)
r153
1115}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1116{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1117}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1118{{{#!if rb=(+rb)
1119}}}}}}
r176
1120{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1121}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1122{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1123}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1124{{{#!if rb=rb+(+tw)
r153
1125}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1126{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1127}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1128{{{#!if rb=(+rb)
r222
1129}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1130}}}
r134
1131
r153
1132##ru
r184
1133ru부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bu의 나머지 절반 + au*bu의 절반), au*bb의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r153
1134{{{#!if i=0+0, tv=1, ps=false
1135}}}
r155
1136##for i=0 to 17
r185
1137{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1138}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1139{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1140}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1141{{{#!if ru=ru+(+tw)
1142}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1143{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1144}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1145{{{#!if ru=(+ru)
1146}}}}}}
r184
1147{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1148}}}{{{#!if ru.length==19
r155
1149{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1150}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1151{{{#!if ru=(+ru)
r222
1152}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1153}}}
1154## i=1
r185
1155{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1156}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1157{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1158}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1159{{{#!if ru=ru+(+tw)
1160}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1161{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1162}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1163{{{#!if ru=(+ru)
1164}}}}}}
r184
1165{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1166}}}{{{#!if ru.length==19
r155
1167{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1168}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1169{{{#!if ru=(+ru)
r222
1170}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1171}}}
1172## i=2
r185
1173{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1174}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1175{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1176}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1177{{{#!if ru=ru+(+tw)
1178}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1179{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1180}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1181{{{#!if ru=(+ru)
1182}}}}}}
r184
1183{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1184}}}{{{#!if ru.length==19
r155
1185{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1186}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1187{{{#!if ru=(+ru)
r222
1188}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1189}}}
1190## i=3
r185
1191{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1192}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1193{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1194}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1195{{{#!if ru=ru+(+tw)
1196}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1197{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1198}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1199{{{#!if ru=(+ru)
1200}}}}}}
r184
1201{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1202}}}{{{#!if ru.length==19
r155
1203{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1204}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1205{{{#!if ru=(+ru)
r222
1206}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1207}}}
1208## i=4
r185
1209{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1210}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1211{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1212}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1213{{{#!if ru=ru+(+tw)
1214}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1215{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1216}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1217{{{#!if ru=(+ru)
1218}}}}}}
r184
1219{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1220}}}{{{#!if ru.length==19
r155
1221{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1222}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1223{{{#!if ru=(+ru)
r222
1224}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1225}}}
1226## i=5
r185
1227{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1228}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1229{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1230}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1231{{{#!if ru=ru+(+tw)
1232}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1233{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1234}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1235{{{#!if ru=(+ru)
1236}}}}}}
r184
1237{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1238}}}{{{#!if ru.length==19
r155
1239{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1240}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1241{{{#!if ru=(+ru)
r222
1242}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1243}}}
1244## i=6
r185
1245{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1246}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1247{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1248}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1249{{{#!if ru=ru+(+tw)
1250}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1251{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1252}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1253{{{#!if ru=(+ru)
1254}}}}}}
r184
1255{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1256}}}{{{#!if ru.length==19
r155
1257{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1258}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1259{{{#!if ru=(+ru)
r222
1260}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1261}}}
1262## i=7
r185
1263{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1264}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1265{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1266}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1267{{{#!if ru=ru+(+tw)
1268}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1269{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1270}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1271{{{#!if ru=(+ru)
1272}}}}}}
r184
1273{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1274}}}{{{#!if ru.length==19
r155
1275{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1276}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1277{{{#!if ru=(+ru)
r222
1278}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1279}}}
1280## i=8
r185
1281{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1282}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1283{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1284}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1285{{{#!if ru=ru+(+tw)
1286}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1287{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1288}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1289{{{#!if ru=(+ru)
1290}}}}}}
r184
1291{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1292}}}{{{#!if ru.length==19
r155
1293{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1294}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1295{{{#!if ru=(+ru)
r222
1296}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1297}}}
1298## i=9
r185
1299{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1300}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1301{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1302}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1303{{{#!if ru=ru+(+tw)
1304}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1305{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1306}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1307{{{#!if ru=(+ru)
1308}}}}}}
r184
1309{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1310}}}{{{#!if ru.length==19
r155
1311{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1312}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1313{{{#!if ru=(+ru)
r222
1314}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1315}}}
1316## i=10
r185
1317{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1318}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1319{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1320}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1321{{{#!if ru=ru+(+tw)
1322}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1323{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1324}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1325{{{#!if ru=(+ru)
1326}}}}}}
r184
1327{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1328}}}{{{#!if ru.length==19
r155
1329{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1330}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1331{{{#!if ru=(+ru)
r222
1332}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1333}}}
1334## i=11
r185
1335{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1336}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1337{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1338}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1339{{{#!if ru=ru+(+tw)
1340}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1341{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1342}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1343{{{#!if ru=(+ru)
1344}}}}}}
r184
1345{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1346}}}{{{#!if ru.length==19
r155
1347{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1348}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1349{{{#!if ru=(+ru)
r222
1350}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1351}}}
1352## i=12
r185
1353{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1354}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1355{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1356}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1357{{{#!if ru=ru+(+tw)
1358}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1359{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1360}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1361{{{#!if ru=(+ru)
1362}}}}}}
r184
1363{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1364}}}{{{#!if ru.length==19
r155
1365{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1366}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1367{{{#!if ru=(+ru)
r222
1368}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1369}}}
1370## i=13
r185
1371{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1372}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1373{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1374}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1375{{{#!if ru=ru+(+tw)
1376}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1377{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1378}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1379{{{#!if ru=(+ru)
1380}}}}}}
r184
1381{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1382}}}{{{#!if ru.length==19
r155
1383{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1384}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1385{{{#!if ru=(+ru)
r222
1386}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1387}}}
1388## i=14
r185
1389{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1390}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1391{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1392}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1393{{{#!if ru=ru+(+tw)
1394}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1395{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1396}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1397{{{#!if ru=(+ru)
1398}}}}}}
r184
1399{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1400}}}{{{#!if ru.length==19
r155
1401{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1402}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1403{{{#!if ru=(+ru)
r222
1404}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1405}}}
1406## i=15
r185
1407{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1408}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1409{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1410}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1411{{{#!if ru=ru+(+tw)
1412}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1413{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1414}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1415{{{#!if ru=(+ru)
1416}}}}}}
r184
1417{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1418}}}{{{#!if ru.length==19
r155
1419{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1420}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1421{{{#!if ru=(+ru)
r222
1422}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1423}}}
1424## i=16
r185
1425{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1426}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1427{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1428}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1429{{{#!if ru=ru+(+tw)
1430}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1431{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1432}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1433{{{#!if ru=(+ru)
1434}}}}}}
r184
1435{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1436}}}{{{#!if ru.length==19
r155
1437{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1438}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1439{{{#!if ru=(+ru)
r222
1440}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1441}}}
1442## i=17
r185
1443{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1444}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1445{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1446}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1447{{{#!if ru=ru+(+tw)
1448}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1449{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1450}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1451{{{#!if ru=(+ru)
1452}}}}}}
r184
1453{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1454}}}{{{#!if ru.length==19
r155
1455{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1456}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1457{{{#!if ru=(+ru)
r222
1458}}}}}}{{{#!if i+=1, tv*=10, ps=false
r184
1459}}}
r156
1460##rs
1461rs부분을 합산합니다. au*bu의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다. 소수점 윗자리는 많아야 36자리이므로 rs에서 더 이상 넘치지 않습니다.
1462{{{#!if i=0+0, tv=1, ps=false
1463}}}
1464##for i=0 to 17
r184
1465{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1466}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1467}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1468}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1469}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1470}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1471}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1472}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1473}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1474}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
1475}}}
r184
1476{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1477}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1478}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1479}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1480}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1481}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1482}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1483}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
1484}}}
r190
1485여기까지가 곱셈에서 a*b 의 연산 과정이며 rb 정리 부분으로 넘어갑니다.
r164
1486}}}
1487
r261
1488##=== 나눗셈 ===
r194
1489a와 b 모두 0이 아닌 경우에서 나눗셈을 연산하는 과정입니다.
1490{{{#!if (f=="/")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
1491
1492au, ab, bu, bb를 18자로 만들었으므로 36자리 정수의 나눗셈으로 봅니다.
1493a/b=(au+ab)/(bu+bb)=(+(au.substr(0,18)+ab.substr(0,18)))/(+(bu.substr(0,18)+bb.substr(0,18)))와 같습니다.
r195
1494
r229
1495##몫 서술
1496제일 높은 자리부터 내려오면서 처음으로 0이 아닌 수를 왼쪽으로 당기는 과정을 거쳤으므로 (1부터 시작하는 18자리+18자리 숫자)/(1부터 시작하는 18자리+18자리 수) 연산이 됩니다.
1497
1498{{{#!if ps=false
r342
1499}}}ps를 false로 초기화합니다. 변수에 값을 주는 여부로 ps를 사용합니다.
r229
1500
1501##i=0
1502{{{#!if br=false
1503}}}다시 정렬된 bu, bb의 값은 바뀌지 않습니다. bu, bb로 나눈 몫만큼 au, ab에서 감소시킨 다음 au와 ab를 다시 정렬시키며, au와 ab가 모두 0이 되면 더 이상 계산하지 않도록 br를 true로 반환합니다.
r230
1504그 다음 계산을 편하게 할 수 있도록 텍스트값으로 된 au, ab, bu, bb를 정수값으로 변환합니다.
r291
1505{{{#!if au=+au, ab=+ab, bu=+bu, bb=+bb
r230
1506}}}
r229
1507
r338
1508먼저 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
1509{{{#!if tw=au/bu
1510}}}
1511bu, bb를 각각 tw만큼 곱한 값을 tx, ty로 정의합니다.
1512{{{#!if tx=bu*tw, ty=bb*tw
1513}}}
r341
1514이 때 ty가 19자리가 되면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더하고 아래 18자리의 값을 ty로 다시 정의합니다. tx는 19자리 숫자가 되어도 문제가 없습니다. 만일 ty가 19자리가 되지 않는다면 tx와 ty를 그대로 둡니다. 그 다음 ty를 정수로 바꿉니다.
r343
1515{{{#!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
1516}}}
r340
1517이렇게 하면 tx=bu*tw<=au가 됩니다. (bu가 au보다 크면 tw는 tw의 정의에서 값이 0이 되므로 부등호가 성립됩니다.)
1518
r338
1519(2.1/1.6 처럼) ty가 넘쳐 tx 값이 더해지는 경우가 있으므로 몫이 유효한 값인지 검산합니다. 만일 tx ty 가 기존 au ab을 넘게 되면 tw에서 1을 빼고, tx, ty를 다시 정의합니다. 그러나 tw가 이미 0이 되었을 경우 tw를 0으로 둡니다.
r231
1520{{{#!if (tx>au)||((tx==au)&&(ty>ab))
r338
1521{{{#!if tw=(tw==0)?0:tw-1, tx=bu*tw, ty=bb*tw
r231
1522}}}
r339
1523마찬가지로 ty가 19자리가 된다면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더합니다. 그 다음 ty를 정수로 바꿉니다.
r343
1524{{{#!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
1525}}}
1526}}}
r231
1527이렇게 만들어진 tx, ty가 있으면 이를 반영합니다.
r340
1528au에서 tx를, ab에서 ty를 뺍니다. 만약 ty>ab일 경우 au에서 1을 가져와 (au에서 1을 빼고) ab에 1,000,000,000,000,000,000을 더한 다음 계산합니다.
r233
1529{{{#!if ty>ab
r234
1530{{{#!if au-=1, ab+=+("1"+pd)
r231
1531}}}}}}
r233
1532{{{#!if au-=tx, ab-=ty
r340
1533}}}
r253
1534몫인 tw를 문자열로 바꾸고 tm의 오른쪽에 더합니다.
1535{{{#!if tw=tw.toString(), tm+=tw
1536}}}
r241
1537au, ab에서 몫을 빼고 나니 au, ab가 모두 0으로 된다면 더 이상 계산을 하지 않아야 하므로 br를 true로 반환합니다.
1538{{{#!if (au==0)&&(ab==0)
r233
1539{{{#!if br=true
1540}}}}}}
r241
1541어느 하나가 0이 되지 않는다면 br는 여전히 false이므로 !br일 때 자릿수를 옮깁니다.
1542{{{#!if !br
r233
1543au, ab를 문자열로 다시 바꿉니다.
1544{{{#!if au=au.toString(), ab=ab.toString()
1545}}}
r344
1546au가 여전히 18자리 숫자일 경우 au의 첫번째 자리를 분리해 내어 tn으로 정의하고 나머지 17자리를 au로 둡니다. 그렇지 않을 경우 (au가 17자리 미만의 숫자가 되었다면) tn은 빈 문자열으로 두고 au의 왼쪽을 0(pd)으로 채운 다음 (적어도 19자리가 되는 문자열을) 뒤에서 17번째 자리부터 가지고 와 au로 만듭니다.
1547{{{#!if ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17)
r341
1548}}}
r234
1549ab가 18자리 미만의 숫자가 되었다면 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
r341
1550{{{#!if ab=(ab.length<18)?(pd+ab).substr(-18):ab
1551}}}
r234
1552au의 뒤로 ab의 처음 자리를 끌어옵니다.
1553{{{#!if au+=ab.substr(0,1)
r233
1554}}}
r234
1555ab의 나머지 17자리를 앞으로 당긴 다음 "0"을 더합니다.
r344
1556{{{#!if ab=ab.substr(1)+"0"
r241
1557}}}
1558여기까지가 자릿수를 한 칸씩 옮기는 과정입니다.
1559}}}
r234
1560##i=1 part 1
r239
1561몫으로 기록할 숫자의 첫번째 자리를 구했다면, 그 다음 자리의 숫자를 찾기 위해 (변수 tn으로 만들 수 있는 여분의 1자리 +) 18자리 + 18자리 숫자를 18자리+18자리 숫자로 나누는 계산을 합니다. tn이 9가 될 경우 9로 시작하는 19자리 숫자를 long integer로 모두 표현할 수 없으므로 10**18 자리부터 먼저 계산합니다. 10**18의 1번째 숫자의 몫을 구한 다음 나머지를 18자리 숫자에 더하는 과정(part 1)을 거친 다음 그 18자리에서 몫을 구하는 과정(part 2)을 거칩니다.
r235
1562
r240
1563au와 ab를 정수로 다시 바꾸고 tz를 0으로 초기화합니다. 그리고 tn이 빈 문자열이 아니라면 (앞에 au에서 한 자리 수를 떼온 것이므로) tn에 0을 더하여 19자리로 만들고 몫을 구합니다.
r345
1564{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
r239
1565tn을 19자리 정수로 바꿉니다.
r342
1566{{{#!if tn+=pd, tn=+tn
r235
1567}}}
1568tz를 몫으로 정의합니다. 앞의 tw를 처리하는 방법과 같습니다. tn을 정수로 만들었으므로 소수점 아래를 비교한다면 정수의 소수점 아래에 해당하는 0과 비교합니다.
r342
1569{{{#!if tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString()
r239
1570}}}
r342
1571마찬가지로 ty가 19자리 숫자이면 1자리를 떼어 tx에 더합니다.
r343
1572{{{#!if ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
r342
1573}}}
1574앞의 tw를 처리할 때 au와 tx를 비교한 것처럼 tz를 처리할 때 tn와 tx를 비교합니다.
r235
1575{{{#!if (tx>tn)||((tx==tn)&&(ty>0))
r342
1576{{{#!if tz=(tz==0)?0:tz-1, tx=bu*tz, ty=bb*tz
r343
1577}}}{{{#!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
1578}}}}}}
r238
1579tn에서 나누어떨어지는 값을 뺀 나머지를 반영하여 au, ab에 더합니다. 소수점 아래 부분인 ab보다 ty가 크다면 tn에서 1을 빼어 계산합니다.
r237
1580{{{#!if ty>ab
1581{{{#!if tn-=1, ab+=+("1"+pd)
r236
1582}}}}}}
r237
1583{{{#!if au+=(tn-tx), ab-=ty
r234
1584}}}
r237
1585tn을 빈 문자열로 초기화합니다.
1586{{{#!if tn=""
1587}}}
1588}}}
r234
1589##i=1 part 2
r239
1590br(0으로 나누어떨어짐) 이 걸려있으면 실행하지 않습니다. 그러므로 전체적으로 조건을 !br로 둔 다음 계산을 진행합니다.
r238
1591{{{#!if !br
r343
1592tw, tx, ty를 정의하고 처리하는 과정은 앞자리에서 몫을 찾는 과정과 동일합니다. 앞의 part 1에서 이미 au, ab를 정수로 만들었으므로 여기에 au, ab를 정수로 만드는 처리를 할 필요가 없습니다.
r344
1593{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty
1594}}}
r240
1595ty를 정수로 바꾸는 과정을 아래 if 조건문으로 병합합니다.
1596{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
r344
1597{{{#!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
1598}}}}}}
r253
1599{{{#!if ty>ab
r240
1600{{{#!if au-=1, ab+=+("1"+pd)
1601}}}}}}{{{#!if au-=tx, ab-=ty
r343
1602}}}
r254
1603앞에서 계산된 tz의 값을 tw에 더한 다음 tw를 문자열로 바꿉니다. 그리고 tm에 문자열로 바꾼 tw을 더합니다.
r253
1604{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1605}}}
r281
1606au와 ab가 모두 0이 될 때 br를 true로 정의합니다.
r241
1607{{{#!if (au==0)&&(ab==0)
1608{{{#!if br=true
r240
1609}}}}}}}}}
1610어느 자릿수부터 br가 true로 되면 이후 자릿수 옮겨 몫을 구하는 과정이나 나머지를 정리하는 과정을 더 이상 할 필요가 없습니다.
r241
1611{{{#!if !br
r240
1612au, ab를 문자열로 다시 바꾸고 처리하는 과정은 동일합니다.
1613{{{#!if au=au.toString(), ab=ab.toString()
r239
1614}}}
r252
1615ps를 au 자릿수가 18이 되었을 때 true가 되는 논리값으로 정의합니다.
r344
1616{{{#!if ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(1):(pd+au).substr(-17)
r239
1617}}}
r344
1618{{{#!if ab=(ab.length<18)?(pd+ab).substr(-18):ab
r240
1619}}}
r344
1620{{{#!if au+=ab.substr(0,1), ab=ab.substr(1)+"0"
1621}}}}}}
r240
1622##i=2
r242
1623이후부터 과정은 동일합니다. 많아야 소수점 위 36자리, 소수점 아래 36자리 모두를 쓰면 72개이므로 총 72회(for i=0 to i=71)를 진행합니다.
r345
1624{{{#!if au=+au, ab=+ab, !br&&(tn!="")
1625{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty
1626}}}{{{#!if (tx>tn)||((tx==tn)&&(ty>0))
1627{{{#!if tz=(tz==0):0:tz-1, tx=bu*tz, ty=bb*tz, 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
1628}}}}}}
1629{{{#!if ty>ab
1630{{{#!if tn-=1, ab+=+("1"+pd)
1631}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r345
1632}}}}}}{{{#!if !br
1633{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw, ty=ty.toString(), ps=(ty.length==19), tx=ps?tx+(+ty.substr(0,1)):tx, ty=ps?ty=ty.substr(1):ty, ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1634{{{#!if tw-=1, tx=bu*tw, ty=bb*tw, 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
1635}}}}}}
r255
1636{{{#!if ty>ab
r241
1637{{{#!if au-=1, ab+=+("1"+pd)
r345
1638}}}}}}{{{#!if au-=tx, ab-=ty, tw+=tz, tw=tw.toString(), tm+=tw
r240
1639}}}
r241
1640{{{#!if (au==0)&&(ab==0)
1641{{{#!if br=true
r256
1642}}}}}}}}}
r241
1643{{{#!if !br
r345
1644{{{#!if au=au.toString(), ab=ab.toString(), ps=(au.length==18), tn=ps?au.substr(0,1):"", au=ps?au.substr(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
1645}}}}}}
r242
1646##i=3
1647{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1648{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1649}}}{{{#!if ty=ty.toString(), ty.length==19
1650{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1651}}}}}}
1652{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1653{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1654}}}{{{#!if ty=ty.toString(), ty.length==19
1655{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1656}}}}}}{{{#!if ty=+ty
1657}}}}}}
1658{{{#!if ty>ab
1659{{{#!if tn-=1, ab+=+("1"+pd)
1660}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1661}}}}}}
1662{{{#!if !br
r249
1663{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1664{{{#!if ps=true, tw=0
r242
1665}}}}}}
1666{{{#!if !ps
1667{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1668}}}{{{#!if ty=ty.toString(), ty.length==19
1669{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1670}}}}}}
1671{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1672{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1673}}}{{{#!if ty=ty.toString(), ty.length==19
1674{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1675}}}}}}{{{#!if ty=+ty
1676}}}}}}
r256
1677{{{#!if ty>ab
r242
1678{{{#!if au-=1, ab+=+("1"+pd)
1679}}}}}}{{{#!if au-=tx, ab-=ty
r256
1680}}}}}}
1681{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1682}}}
1683{{{#!if (au==0)&&(ab==0)
1684{{{#!if br=true
1685}}}}}}}}}
1686{{{#!if !br
1687{{{#!if au=au.toString(), ab=ab.toString()
r252
1688}}}{{{#!if tn="", ps=(au.length==18), ps
1689{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1690}}}}}}{{{#!if !ps&&(au.length<17)
1691{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1692}}}}}}{{{#!if ab.length<18
1693{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1694}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1695}}}}}}
r242
1696##i=4
1697{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1698{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1699}}}{{{#!if ty=ty.toString(), ty.length==19
1700{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1701}}}}}}
1702{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1703{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1704}}}{{{#!if ty=ty.toString(), ty.length==19
1705{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1706}}}}}}{{{#!if ty=+ty
1707}}}}}}
1708{{{#!if ty>ab
1709{{{#!if tn-=1, ab+=+("1"+pd)
1710}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1711}}}}}}
1712{{{#!if !br
r249
1713{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1714{{{#!if ps=true, tw=0
r242
1715}}}}}}
1716{{{#!if !ps
1717{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1718}}}{{{#!if ty=ty.toString(), ty.length==19
1719{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1720}}}}}}
1721{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1722{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1723}}}{{{#!if ty=ty.toString(), ty.length==19
1724{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1725}}}}}}{{{#!if ty=+ty
1726}}}}}}
r256
1727{{{#!if ty>ab
r242
1728{{{#!if au-=1, ab+=+("1"+pd)
1729}}}}}}{{{#!if au-=tx, ab-=ty
r256
1730}}}}}}
1731{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1732}}}
1733{{{#!if (au==0)&&(ab==0)
1734{{{#!if br=true
1735}}}}}}}}}
1736{{{#!if !br
1737{{{#!if au=au.toString(), ab=ab.toString()
r252
1738}}}{{{#!if tn="", ps=(au.length==18), ps
1739{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1740}}}}}}{{{#!if !ps&&(au.length<17)
1741{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1742}}}}}}{{{#!if ab.length<18
1743{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1744}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1745}}}}}}
r242
1746##i=5
1747{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1748{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1749}}}{{{#!if ty=ty.toString(), ty.length==19
1750{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1751}}}}}}
1752{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1753{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1754}}}{{{#!if ty=ty.toString(), ty.length==19
1755{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1756}}}}}}{{{#!if ty=+ty
1757}}}}}}
1758{{{#!if ty>ab
1759{{{#!if tn-=1, ab+=+("1"+pd)
1760}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1761}}}}}}
1762{{{#!if !br
r249
1763{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1764{{{#!if ps=true, tw=0
r242
1765}}}}}}
1766{{{#!if !ps
1767{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1768}}}{{{#!if ty=ty.toString(), ty.length==19
1769{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1770}}}}}}
1771{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1772{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1773}}}{{{#!if ty=ty.toString(), ty.length==19
1774{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1775}}}}}}{{{#!if ty=+ty
1776}}}}}}
r256
1777{{{#!if ty>ab
r242
1778{{{#!if au-=1, ab+=+("1"+pd)
1779}}}}}}{{{#!if au-=tx, ab-=ty
r256
1780}}}}}}
1781{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1782}}}
1783{{{#!if (au==0)&&(ab==0)
1784{{{#!if br=true
1785}}}}}}}}}
1786{{{#!if !br
1787{{{#!if au=au.toString(), ab=ab.toString()
r252
1788}}}{{{#!if tn="", ps=(au.length==18), ps
1789{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1790}}}}}}{{{#!if !ps&&(au.length<17)
1791{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1792}}}}}}{{{#!if ab.length<18
1793{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1794}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1795}}}}}}
r242
1796##i=6
1797{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1798{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1799}}}{{{#!if ty=ty.toString(), ty.length==19
1800{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1801}}}}}}
1802{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1803{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1804}}}{{{#!if ty=ty.toString(), ty.length==19
1805{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1806}}}}}}{{{#!if ty=+ty
1807}}}}}}
1808{{{#!if ty>ab
1809{{{#!if tn-=1, ab+=+("1"+pd)
1810}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1811}}}}}}
1812{{{#!if !br
r249
1813{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1814{{{#!if ps=true, tw=0
r242
1815}}}}}}
1816{{{#!if !ps
1817{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1818}}}{{{#!if ty=ty.toString(), ty.length==19
1819{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1820}}}}}}
1821{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1822{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1823}}}{{{#!if ty=ty.toString(), ty.length==19
1824{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1825}}}}}}{{{#!if ty=+ty
1826}}}}}}
r256
1827{{{#!if ty>ab
r242
1828{{{#!if au-=1, ab+=+("1"+pd)
1829}}}}}}{{{#!if au-=tx, ab-=ty
r256
1830}}}}}}
1831{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1832}}}
1833{{{#!if (au==0)&&(ab==0)
1834{{{#!if br=true
1835}}}}}}}}}
1836{{{#!if !br
1837{{{#!if au=au.toString(), ab=ab.toString()
r252
1838}}}{{{#!if tn="", ps=(au.length==18), ps
1839{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1840}}}}}}{{{#!if !ps&&(au.length<17)
1841{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1842}}}}}}{{{#!if ab.length<18
1843{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1844}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1845}}}}}}
r242
1846##i=7
1847{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1848{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1849}}}{{{#!if ty=ty.toString(), ty.length==19
1850{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1851}}}}}}
1852{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1853{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1854}}}{{{#!if ty=ty.toString(), ty.length==19
1855{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1856}}}}}}{{{#!if ty=+ty
1857}}}}}}
1858{{{#!if ty>ab
1859{{{#!if tn-=1, ab+=+("1"+pd)
1860}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1861}}}}}}
1862{{{#!if !br
r249
1863{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1864{{{#!if ps=true, tw=0
r242
1865}}}}}}
1866{{{#!if !ps
1867{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1868}}}{{{#!if ty=ty.toString(), ty.length==19
1869{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1870}}}}}}
1871{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1872{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1873}}}{{{#!if ty=ty.toString(), ty.length==19
1874{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1875}}}}}}{{{#!if ty=+ty
1876}}}}}}
r256
1877{{{#!if ty>ab
r242
1878{{{#!if au-=1, ab+=+("1"+pd)
1879}}}}}}{{{#!if au-=tx, ab-=ty
r256
1880}}}}}}
1881{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1882}}}
1883{{{#!if (au==0)&&(ab==0)
1884{{{#!if br=true
1885}}}}}}}}}
1886{{{#!if !br
1887{{{#!if au=au.toString(), ab=ab.toString()
r252
1888}}}{{{#!if tn="", ps=(au.length==18), ps
1889{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1890}}}}}}{{{#!if !ps&&(au.length<17)
1891{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1892}}}}}}{{{#!if ab.length<18
1893{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1894}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1895}}}}}}
r242
1896##i=8
1897{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1898{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1899}}}{{{#!if ty=ty.toString(), ty.length==19
1900{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1901}}}}}}
1902{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1903{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1904}}}{{{#!if ty=ty.toString(), ty.length==19
1905{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1906}}}}}}{{{#!if ty=+ty
1907}}}}}}
1908{{{#!if ty>ab
1909{{{#!if tn-=1, ab+=+("1"+pd)
1910}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1911}}}}}}
1912{{{#!if !br
r249
1913{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1914{{{#!if ps=true, tw=0
r242
1915}}}}}}
1916{{{#!if !ps
1917{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1918}}}{{{#!if ty=ty.toString(), ty.length==19
1919{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1920}}}}}}
1921{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1922{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1923}}}{{{#!if ty=ty.toString(), ty.length==19
1924{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1925}}}}}}{{{#!if ty=+ty
1926}}}}}}
r256
1927{{{#!if ty>ab
r242
1928{{{#!if au-=1, ab+=+("1"+pd)
1929}}}}}}{{{#!if au-=tx, ab-=ty
r256
1930}}}}}}
1931{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1932}}}
1933{{{#!if (au==0)&&(ab==0)
1934{{{#!if br=true
1935}}}}}}}}}
1936{{{#!if !br
1937{{{#!if au=au.toString(), ab=ab.toString()
r252
1938}}}{{{#!if tn="", ps=(au.length==18), ps
1939{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1940}}}}}}{{{#!if !ps&&(au.length<17)
1941{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1942}}}}}}{{{#!if ab.length<18
1943{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1944}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1945}}}}}}
r242
1946##i=9
1947{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1948{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1949}}}{{{#!if ty=ty.toString(), ty.length==19
1950{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1951}}}}}}
1952{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1953{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1954}}}{{{#!if ty=ty.toString(), ty.length==19
1955{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1956}}}}}}{{{#!if ty=+ty
1957}}}}}}
1958{{{#!if ty>ab
1959{{{#!if tn-=1, ab+=+("1"+pd)
1960}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1961}}}}}}
1962{{{#!if !br
r249
1963{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1964{{{#!if ps=true, tw=0
r242
1965}}}}}}
1966{{{#!if !ps
1967{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1968}}}{{{#!if ty=ty.toString(), ty.length==19
1969{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1970}}}}}}
1971{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1972{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1973}}}{{{#!if ty=ty.toString(), ty.length==19
1974{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1975}}}}}}{{{#!if ty=+ty
1976}}}}}}
r256
1977{{{#!if ty>ab
r242
1978{{{#!if au-=1, ab+=+("1"+pd)
1979}}}}}}{{{#!if au-=tx, ab-=ty
r256
1980}}}}}}
1981{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1982}}}
1983{{{#!if (au==0)&&(ab==0)
1984{{{#!if br=true
1985}}}}}}}}}
1986{{{#!if !br
1987{{{#!if au=au.toString(), ab=ab.toString()
r252
1988}}}{{{#!if tn="", ps=(au.length==18), ps
1989{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1990}}}}}}{{{#!if !ps&&(au.length<17)
1991{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1992}}}}}}{{{#!if ab.length<18
1993{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1994}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1995}}}}}}
r242
1996##i=10
1997{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1998{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1999}}}{{{#!if ty=ty.toString(), ty.length==19
2000{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2001}}}}}}
2002{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2003{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2004}}}{{{#!if ty=ty.toString(), ty.length==19
2005{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2006}}}}}}{{{#!if ty=+ty
2007}}}}}}
2008{{{#!if ty>ab
2009{{{#!if tn-=1, ab+=+("1"+pd)
2010}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2011}}}}}}
2012{{{#!if !br
r249
2013{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2014{{{#!if ps=true, tw=0
r242
2015}}}}}}
2016{{{#!if !ps
2017{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2018}}}{{{#!if ty=ty.toString(), ty.length==19
2019{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2020}}}}}}
2021{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2022{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2023}}}{{{#!if ty=ty.toString(), ty.length==19
2024{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2025}}}}}}{{{#!if ty=+ty
2026}}}}}}
r256
2027{{{#!if ty>ab
r242
2028{{{#!if au-=1, ab+=+("1"+pd)
2029}}}}}}{{{#!if au-=tx, ab-=ty
r256
2030}}}}}}
2031{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
2032}}}
2033{{{#!if (au==0)&&(ab==0)
2034{{{#!if br=true
2035}}}}}}}}}
2036{{{#!if !br
2037{{{#!if au=au.toString(), ab=ab.toString()
r252
2038}}}{{{#!if tn="", ps=(au.length==18), ps
2039{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2040}}}}}}{{{#!if !ps&&(au.length<17)
2041{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
2042}}}}}}{{{#!if ab.length<18
2043{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2044}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2045}}}}}}
r243
2046##i=11
2047{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2048{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2049}}}{{{#!if ty=ty.toString(), ty.length==19
2050{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2051}}}}}}
2052{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2053{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2054}}}{{{#!if ty=ty.toString(), ty.length==19
2055{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2056}}}}}}{{{#!if ty=+ty
2057}}}}}}
2058{{{#!if ty>ab
2059{{{#!if tn-=1, ab+=+("1"+pd)
2060}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2061}}}}}}
2062{{{#!if !br
r249
2063{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2064{{{#!if ps=true, tw=0
r243
2065}}}}}}
2066{{{#!if !ps
2067{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2068}}}{{{#!if ty=ty.toString(), ty.length==19
2069{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2070}}}}}}
2071{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2072{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2073}}}{{{#!if ty=ty.toString(), ty.length==19
2074{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2075}}}}}}{{{#!if ty=+ty
2076}}}}}}
r256
2077{{{#!if ty>ab
r243
2078{{{#!if au-=1, ab+=+("1"+pd)
2079}}}}}}{{{#!if au-=tx, ab-=ty
r256
2080}}}}}}
2081{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2082}}}
2083{{{#!if (au==0)&&(ab==0)
2084{{{#!if br=true
2085}}}}}}}}}
2086{{{#!if !br
2087{{{#!if au=au.toString(), ab=ab.toString()
r252
2088}}}{{{#!if tn="", ps=(au.length==18), ps
2089{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2090}}}}}}{{{#!if !ps&&(au.length<17)
2091{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2092}}}}}}{{{#!if ab.length<18
2093{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2094}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2095}}}}}}
r243
2096##i=12
2097{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2098{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2099}}}{{{#!if ty=ty.toString(), ty.length==19
2100{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2101}}}}}}
2102{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2103{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2104}}}{{{#!if ty=ty.toString(), ty.length==19
2105{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2106}}}}}}{{{#!if ty=+ty
2107}}}}}}
2108{{{#!if ty>ab
2109{{{#!if tn-=1, ab+=+("1"+pd)
2110}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2111}}}}}}
2112{{{#!if !br
r249
2113{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2114{{{#!if ps=true, tw=0
r243
2115}}}}}}
2116{{{#!if !ps
2117{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2118}}}{{{#!if ty=ty.toString(), ty.length==19
2119{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2120}}}}}}
2121{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2122{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2123}}}{{{#!if ty=ty.toString(), ty.length==19
2124{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2125}}}}}}{{{#!if ty=+ty
2126}}}}}}
r256
2127{{{#!if ty>ab
r243
2128{{{#!if au-=1, ab+=+("1"+pd)
2129}}}}}}{{{#!if au-=tx, ab-=ty
r256
2130}}}}}}
2131{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2132}}}
2133{{{#!if (au==0)&&(ab==0)
2134{{{#!if br=true
2135}}}}}}}}}
2136{{{#!if !br
2137{{{#!if au=au.toString(), ab=ab.toString()
r252
2138}}}{{{#!if tn="", ps=(au.length==18), ps
2139{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2140}}}}}}{{{#!if !ps&&(au.length<17)
2141{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2142}}}}}}{{{#!if ab.length<18
2143{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2144}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2145}}}}}}
r243
2146##i=13
2147{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2148{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2149}}}{{{#!if ty=ty.toString(), ty.length==19
2150{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2151}}}}}}
2152{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2153{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2154}}}{{{#!if ty=ty.toString(), ty.length==19
2155{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2156}}}}}}{{{#!if ty=+ty
2157}}}}}}
2158{{{#!if ty>ab
2159{{{#!if tn-=1, ab+=+("1"+pd)
2160}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2161}}}}}}
2162{{{#!if !br
r249
2163{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2164{{{#!if ps=true, tw=0
r243
2165}}}}}}
2166{{{#!if !ps
2167{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2168}}}{{{#!if ty=ty.toString(), ty.length==19
2169{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2170}}}}}}
2171{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2172{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2173}}}{{{#!if ty=ty.toString(), ty.length==19
2174{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2175}}}}}}{{{#!if ty=+ty
2176}}}}}}
r256
2177{{{#!if ty>ab
r243
2178{{{#!if au-=1, ab+=+("1"+pd)
2179}}}}}}{{{#!if au-=tx, ab-=ty
r256
2180}}}}}}
2181{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2182}}}
2183{{{#!if (au==0)&&(ab==0)
2184{{{#!if br=true
2185}}}}}}}}}
2186{{{#!if !br
2187{{{#!if au=au.toString(), ab=ab.toString()
r252
2188}}}{{{#!if tn="", ps=(au.length==18), ps
2189{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2190}}}}}}{{{#!if !ps&&(au.length<17)
2191{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2192}}}}}}{{{#!if ab.length<18
2193{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2194}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2195}}}}}}
r243
2196##i=14
2197{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2198{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2199}}}{{{#!if ty=ty.toString(), ty.length==19
2200{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2201}}}}}}
2202{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2203{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2204}}}{{{#!if ty=ty.toString(), ty.length==19
2205{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2206}}}}}}{{{#!if ty=+ty
2207}}}}}}
2208{{{#!if ty>ab
2209{{{#!if tn-=1, ab+=+("1"+pd)
2210}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2211}}}}}}
2212{{{#!if !br
r249
2213{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2214{{{#!if ps=true, tw=0
r243
2215}}}}}}
2216{{{#!if !ps
2217{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2218}}}{{{#!if ty=ty.toString(), ty.length==19
2219{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2220}}}}}}
2221{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2222{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2223}}}{{{#!if ty=ty.toString(), ty.length==19
2224{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2225}}}}}}{{{#!if ty=+ty
2226}}}}}}
r256
2227{{{#!if ty>ab
r243
2228{{{#!if au-=1, ab+=+("1"+pd)
2229}}}}}}{{{#!if au-=tx, ab-=ty
r256
2230}}}}}}
2231{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2232}}}
2233{{{#!if (au==0)&&(ab==0)
2234{{{#!if br=true
2235}}}}}}}}}
2236{{{#!if !br
2237{{{#!if au=au.toString(), ab=ab.toString()
r252
2238}}}{{{#!if tn="", ps=(au.length==18), ps
2239{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2240}}}}}}{{{#!if !ps&&(au.length<17)
2241{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2242}}}}}}{{{#!if ab.length<18
2243{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2244}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2245}}}}}}
r243
2246##i=15
2247{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2248{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2249}}}{{{#!if ty=ty.toString(), ty.length==19
2250{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2251}}}}}}
2252{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2253{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2254}}}{{{#!if ty=ty.toString(), ty.length==19
2255{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2256}}}}}}{{{#!if ty=+ty
2257}}}}}}
2258{{{#!if ty>ab
2259{{{#!if tn-=1, ab+=+("1"+pd)
2260}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2261}}}}}}
2262{{{#!if !br
r249
2263{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2264{{{#!if ps=true, tw=0
r243
2265}}}}}}
2266{{{#!if !ps
2267{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2268}}}{{{#!if ty=ty.toString(), ty.length==19
2269{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2270}}}}}}
2271{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2272{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2273}}}{{{#!if ty=ty.toString(), ty.length==19
2274{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2275}}}}}}{{{#!if ty=+ty
2276}}}}}}
r256
2277{{{#!if ty>ab
r243
2278{{{#!if au-=1, ab+=+("1"+pd)
2279}}}}}}{{{#!if au-=tx, ab-=ty
r256
2280}}}}}}
2281{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2282}}}
2283{{{#!if (au==0)&&(ab==0)
2284{{{#!if br=true
2285}}}}}}}}}
2286{{{#!if !br
2287{{{#!if au=au.toString(), ab=ab.toString()
r252
2288}}}{{{#!if tn="", ps=(au.length==18), ps
2289{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2290}}}}}}{{{#!if !ps&&(au.length<17)
2291{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2292}}}}}}{{{#!if ab.length<18
2293{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2294}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2295}}}}}}
r243
2296##i=16
2297{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2298{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2299}}}{{{#!if ty=ty.toString(), ty.length==19
2300{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2301}}}}}}
2302{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2303{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2304}}}{{{#!if ty=ty.toString(), ty.length==19
2305{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2306}}}}}}{{{#!if ty=+ty
2307}}}}}}
2308{{{#!if ty>ab
2309{{{#!if tn-=1, ab+=+("1"+pd)
2310}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2311}}}}}}
2312{{{#!if !br
r249
2313{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2314{{{#!if ps=true, tw=0
r243
2315}}}}}}
2316{{{#!if !ps
2317{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2318}}}{{{#!if ty=ty.toString(), ty.length==19
2319{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2320}}}}}}
2321{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2322{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2323}}}{{{#!if ty=ty.toString(), ty.length==19
2324{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2325}}}}}}{{{#!if ty=+ty
2326}}}}}}
r256
2327{{{#!if ty>ab
r243
2328{{{#!if au-=1, ab+=+("1"+pd)
2329}}}}}}{{{#!if au-=tx, ab-=ty
r256
2330}}}}}}
2331{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2332}}}
2333{{{#!if (au==0)&&(ab==0)
2334{{{#!if br=true
2335}}}}}}}}}
2336{{{#!if !br
2337{{{#!if au=au.toString(), ab=ab.toString()
r252
2338}}}{{{#!if tn="", ps=(au.length==18), ps
2339{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2340}}}}}}{{{#!if !ps&&(au.length<17)
2341{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2342}}}}}}{{{#!if ab.length<18
2343{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2344}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2345}}}}}}
r243
2346##i=17
2347{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2348{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2349}}}{{{#!if ty=ty.toString(), ty.length==19
2350{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2351}}}}}}
2352{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2353{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2354}}}{{{#!if ty=ty.toString(), ty.length==19
2355{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2356}}}}}}{{{#!if ty=+ty
2357}}}}}}
2358{{{#!if ty>ab
2359{{{#!if tn-=1, ab+=+("1"+pd)
2360}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2361}}}}}}
2362{{{#!if !br
r249
2363{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2364{{{#!if ps=true, tw=0
r243
2365}}}}}}
2366{{{#!if !ps
2367{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2368}}}{{{#!if ty=ty.toString(), ty.length==19
2369{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2370}}}}}}
2371{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2372{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2373}}}{{{#!if ty=ty.toString(), ty.length==19
2374{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2375}}}}}}{{{#!if ty=+ty
2376}}}}}}
r256
2377{{{#!if ty>ab
r243
2378{{{#!if au-=1, ab+=+("1"+pd)
2379}}}}}}{{{#!if au-=tx, ab-=ty
r256
2380}}}}}}
2381{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2382}}}
2383{{{#!if (au==0)&&(ab==0)
2384{{{#!if br=true
2385}}}}}}}}}
2386{{{#!if !br
2387{{{#!if au=au.toString(), ab=ab.toString()
r252
2388}}}{{{#!if tn="", ps=(au.length==18), ps
2389{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2390}}}}}}{{{#!if !ps&&(au.length<17)
2391{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2392}}}}}}{{{#!if ab.length<18
2393{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2394}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2395}}}}}}
r243
2396##i=18
2397{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2398{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2399}}}{{{#!if ty=ty.toString(), ty.length==19
2400{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2401}}}}}}
2402{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2403{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2404}}}{{{#!if ty=ty.toString(), ty.length==19
2405{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2406}}}}}}{{{#!if ty=+ty
2407}}}}}}
2408{{{#!if ty>ab
2409{{{#!if tn-=1, ab+=+("1"+pd)
2410}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2411}}}}}}
2412{{{#!if !br
r249
2413{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2414{{{#!if ps=true, tw=0
r243
2415}}}}}}
2416{{{#!if !ps
2417{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2418}}}{{{#!if ty=ty.toString(), ty.length==19
2419{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2420}}}}}}
2421{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2422{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2423}}}{{{#!if ty=ty.toString(), ty.length==19
2424{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2425}}}}}}{{{#!if ty=+ty
2426}}}}}}
r256
2427{{{#!if ty>ab
r243
2428{{{#!if au-=1, ab+=+("1"+pd)
2429}}}}}}{{{#!if au-=tx, ab-=ty
r256
2430}}}}}}
2431{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2432}}}
2433{{{#!if (au==0)&&(ab==0)
2434{{{#!if br=true
2435}}}}}}}}}
2436{{{#!if !br
2437{{{#!if au=au.toString(), ab=ab.toString()
r252
2438}}}{{{#!if tn="", ps=(au.length==18), ps
2439{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2440}}}}}}{{{#!if !ps&&(au.length<17)
2441{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2442}}}}}}{{{#!if ab.length<18
2443{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2444}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2445}}}}}}
r243
2446##i=19
2447{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2448{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2449}}}{{{#!if ty=ty.toString(), ty.length==19
2450{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2451}}}}}}
2452{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2453{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2454}}}{{{#!if ty=ty.toString(), ty.length==19
2455{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2456}}}}}}{{{#!if ty=+ty
2457}}}}}}
2458{{{#!if ty>ab
2459{{{#!if tn-=1, ab+=+("1"+pd)
2460}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2461}}}}}}
2462{{{#!if !br
r249
2463{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2464{{{#!if ps=true, tw=0
r243
2465}}}}}}
2466{{{#!if !ps
2467{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2468}}}{{{#!if ty=ty.toString(), ty.length==19
2469{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2470}}}}}}
2471{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2472{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2473}}}{{{#!if ty=ty.toString(), ty.length==19
2474{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2475}}}}}}{{{#!if ty=+ty
2476}}}}}}
r256
2477{{{#!if ty>ab
r243
2478{{{#!if au-=1, ab+=+("1"+pd)
2479}}}}}}{{{#!if au-=tx, ab-=ty
r256
2480}}}}}}
2481{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2482}}}
2483{{{#!if (au==0)&&(ab==0)
2484{{{#!if br=true
2485}}}}}}}}}
2486{{{#!if !br
2487{{{#!if au=au.toString(), ab=ab.toString()
r252
2488}}}{{{#!if tn="", ps=(au.length==18), ps
2489{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2490}}}}}}{{{#!if !ps&&(au.length<17)
2491{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2492}}}}}}{{{#!if ab.length<18
2493{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2494}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2495}}}}}}
r243
2496##i=20
2497{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2498{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2499}}}{{{#!if ty=ty.toString(), ty.length==19
2500{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2501}}}}}}
2502{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2503{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2504}}}{{{#!if ty=ty.toString(), ty.length==19
2505{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2506}}}}}}{{{#!if ty=+ty
2507}}}}}}
2508{{{#!if ty>ab
2509{{{#!if tn-=1, ab+=+("1"+pd)
2510}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2511}}}}}}
2512{{{#!if !br
r249
2513{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2514{{{#!if ps=true, tw=0
r243
2515}}}}}}
2516{{{#!if !ps
2517{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2518}}}{{{#!if ty=ty.toString(), ty.length==19
2519{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2520}}}}}}
2521{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2522{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2523}}}{{{#!if ty=ty.toString(), ty.length==19
2524{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2525}}}}}}{{{#!if ty=+ty
2526}}}}}}
r256
2527{{{#!if ty>ab
r243
2528{{{#!if au-=1, ab+=+("1"+pd)
2529}}}}}}{{{#!if au-=tx, ab-=ty
r256
2530}}}}}}
2531{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2532}}}
2533{{{#!if (au==0)&&(ab==0)
2534{{{#!if br=true
2535}}}}}}}}}
2536{{{#!if !br
2537{{{#!if au=au.toString(), ab=ab.toString()
r252
2538}}}{{{#!if tn="", ps=(au.length==18), ps
2539{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2540}}}}}}{{{#!if !ps&&(au.length<17)
2541{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2542}}}}}}{{{#!if ab.length<18
2543{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2544}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2545}}}}}}
r243
2546##i=21
2547{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2548{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2549}}}{{{#!if ty=ty.toString(), ty.length==19
2550{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2551}}}}}}
2552{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2553{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2554}}}{{{#!if ty=ty.toString(), ty.length==19
2555{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2556}}}}}}{{{#!if ty=+ty
2557}}}}}}
2558{{{#!if ty>ab
2559{{{#!if tn-=1, ab+=+("1"+pd)
2560}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2561}}}}}}
2562{{{#!if !br
r249
2563{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2564{{{#!if ps=true, tw=0
r243
2565}}}}}}
2566{{{#!if !ps
2567{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2568}}}{{{#!if ty=ty.toString(), ty.length==19
2569{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2570}}}}}}
2571{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2572{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2573}}}{{{#!if ty=ty.toString(), ty.length==19
2574{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2575}}}}}}{{{#!if ty=+ty
2576}}}}}}
r256
2577{{{#!if ty>ab
r243
2578{{{#!if au-=1, ab+=+("1"+pd)
2579}}}}}}{{{#!if au-=tx, ab-=ty
r256
2580}}}}}}
2581{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2582}}}
2583{{{#!if (au==0)&&(ab==0)
2584{{{#!if br=true
2585}}}}}}}}}
2586{{{#!if !br
2587{{{#!if au=au.toString(), ab=ab.toString()
r252
2588}}}{{{#!if tn="", ps=(au.length==18), ps
2589{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2590}}}}}}{{{#!if !ps&&(au.length<17)
2591{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2592}}}}}}{{{#!if ab.length<18
2593{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2594}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2595}}}}}}
r243
2596##i=22
2597{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2598{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2599}}}{{{#!if ty=ty.toString(), ty.length==19
2600{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2601}}}}}}
2602{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2603{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2604}}}{{{#!if ty=ty.toString(), ty.length==19
2605{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2606}}}}}}{{{#!if ty=+ty
2607}}}}}}
2608{{{#!if ty>ab
2609{{{#!if tn-=1, ab+=+("1"+pd)
2610}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2611}}}}}}
2612{{{#!if !br
r249
2613{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2614{{{#!if ps=true, tw=0
r243
2615}}}}}}
2616{{{#!if !ps
2617{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2618}}}{{{#!if ty=ty.toString(), ty.length==19
2619{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2620}}}}}}
2621{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2622{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2623}}}{{{#!if ty=ty.toString(), ty.length==19
2624{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2625}}}}}}{{{#!if ty=+ty
2626}}}}}}
r256
2627{{{#!if ty>ab
r243
2628{{{#!if au-=1, ab+=+("1"+pd)
2629}}}}}}{{{#!if au-=tx, ab-=ty
r256
2630}}}}}}
2631{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2632}}}
2633{{{#!if (au==0)&&(ab==0)
2634{{{#!if br=true
2635}}}}}}}}}
2636{{{#!if !br
2637{{{#!if au=au.toString(), ab=ab.toString()
r252
2638}}}{{{#!if tn="", ps=(au.length==18), ps
2639{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2640}}}}}}{{{#!if !ps&&(au.length<17)
2641{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2642}}}}}}{{{#!if ab.length<18
2643{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2644}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2645}}}}}}
r243
2646##i=23
2647{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2648{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2649}}}{{{#!if ty=ty.toString(), ty.length==19
2650{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2651}}}}}}
2652{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2653{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2654}}}{{{#!if ty=ty.toString(), ty.length==19
2655{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2656}}}}}}{{{#!if ty=+ty
2657}}}}}}
2658{{{#!if ty>ab
2659{{{#!if tn-=1, ab+=+("1"+pd)
2660}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2661}}}}}}
2662{{{#!if !br
r249
2663{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2664{{{#!if ps=true, tw=0
r243
2665}}}}}}
2666{{{#!if !ps
2667{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2668}}}{{{#!if ty=ty.toString(), ty.length==19
2669{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2670}}}}}}
2671{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2672{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2673}}}{{{#!if ty=ty.toString(), ty.length==19
2674{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2675}}}}}}{{{#!if ty=+ty
2676}}}}}}
r256
2677{{{#!if ty>ab
r243
2678{{{#!if au-=1, ab+=+("1"+pd)
2679}}}}}}{{{#!if au-=tx, ab-=ty
r256
2680}}}}}}
2681{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2682}}}
2683{{{#!if (au==0)&&(ab==0)
2684{{{#!if br=true
2685}}}}}}}}}
2686{{{#!if !br
2687{{{#!if au=au.toString(), ab=ab.toString()
r252
2688}}}{{{#!if tn="", ps=(au.length==18), ps
2689{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2690}}}}}}{{{#!if !ps&&(au.length<17)
2691{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2692}}}}}}{{{#!if ab.length<18
2693{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2694}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2695}}}}}}
r243
2696##i=24
2697{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2698{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2699}}}{{{#!if ty=ty.toString(), ty.length==19
2700{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2701}}}}}}
2702{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2703{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2704}}}{{{#!if ty=ty.toString(), ty.length==19
2705{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2706}}}}}}{{{#!if ty=+ty
2707}}}}}}
2708{{{#!if ty>ab
2709{{{#!if tn-=1, ab+=+("1"+pd)
2710}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2711}}}}}}
2712{{{#!if !br
r249
2713{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2714{{{#!if ps=true, tw=0
r243
2715}}}}}}
2716{{{#!if !ps
2717{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2718}}}{{{#!if ty=ty.toString(), ty.length==19
2719{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2720}}}}}}
2721{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2722{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2723}}}{{{#!if ty=ty.toString(), ty.length==19
2724{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2725}}}}}}{{{#!if ty=+ty
2726}}}}}}
r256
2727{{{#!if ty>ab
r243
2728{{{#!if au-=1, ab+=+("1"+pd)
2729}}}}}}{{{#!if au-=tx, ab-=ty
r256
2730}}}}}}
2731{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2732}}}
2733{{{#!if (au==0)&&(ab==0)
2734{{{#!if br=true
2735}}}}}}}}}
2736{{{#!if !br
2737{{{#!if au=au.toString(), ab=ab.toString()
r252
2738}}}{{{#!if tn="", ps=(au.length==18), ps
2739{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2740}}}}}}{{{#!if !ps&&(au.length<17)
2741{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2742}}}}}}{{{#!if ab.length<18
2743{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2744}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2745}}}}}}
r243
2746##i=25
2747{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2748{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2749}}}{{{#!if ty=ty.toString(), ty.length==19
2750{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2751}}}}}}
2752{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2753{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2754}}}{{{#!if ty=ty.toString(), ty.length==19
2755{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2756}}}}}}{{{#!if ty=+ty
2757}}}}}}
2758{{{#!if ty>ab
2759{{{#!if tn-=1, ab+=+("1"+pd)
2760}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2761}}}}}}
2762{{{#!if !br
r249
2763{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2764{{{#!if ps=true, tw=0
r243
2765}}}}}}
2766{{{#!if !ps
2767{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2768}}}{{{#!if ty=ty.toString(), ty.length==19
2769{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2770}}}}}}
2771{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2772{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2773}}}{{{#!if ty=ty.toString(), ty.length==19
2774{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2775}}}}}}{{{#!if ty=+ty
2776}}}}}}
r256
2777{{{#!if ty>ab
r243
2778{{{#!if au-=1, ab+=+("1"+pd)
2779}}}}}}{{{#!if au-=tx, ab-=ty
r256
2780}}}}}}
2781{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2782}}}
2783{{{#!if (au==0)&&(ab==0)
2784{{{#!if br=true
2785}}}}}}}}}
2786{{{#!if !br
2787{{{#!if au=au.toString(), ab=ab.toString()
r252
2788}}}{{{#!if tn="", ps=(au.length==18), ps
2789{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2790}}}}}}{{{#!if !ps&&(au.length<17)
2791{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2792}}}}}}{{{#!if ab.length<18
2793{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2794}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2795}}}}}}
r243
2796##i=26
2797{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2798{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2799}}}{{{#!if ty=ty.toString(), ty.length==19
2800{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2801}}}}}}
2802{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2803{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2804}}}{{{#!if ty=ty.toString(), ty.length==19
2805{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2806}}}}}}{{{#!if ty=+ty
2807}}}}}}
2808{{{#!if ty>ab
2809{{{#!if tn-=1, ab+=+("1"+pd)
2810}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2811}}}}}}
2812{{{#!if !br
r249
2813{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2814{{{#!if ps=true, tw=0
r243
2815}}}}}}
2816{{{#!if !ps
2817{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2818}}}{{{#!if ty=ty.toString(), ty.length==19
2819{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2820}}}}}}
2821{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2822{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2823}}}{{{#!if ty=ty.toString(), ty.length==19
2824{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2825}}}}}}{{{#!if ty=+ty
2826}}}}}}
r256
2827{{{#!if ty>ab
r243
2828{{{#!if au-=1, ab+=+("1"+pd)
2829}}}}}}{{{#!if au-=tx, ab-=ty
r256
2830}}}}}}
2831{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2832}}}
2833{{{#!if (au==0)&&(ab==0)
2834{{{#!if br=true
2835}}}}}}}}}
2836{{{#!if !br
2837{{{#!if au=au.toString(), ab=ab.toString()
r252
2838}}}{{{#!if tn="", ps=(au.length==18), ps
2839{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2840}}}}}}{{{#!if !ps&&(au.length<17)
2841{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2842}}}}}}{{{#!if ab.length<18
2843{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2844}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2845}}}}}}
r243
2846##i=27
2847{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2848{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2849}}}{{{#!if ty=ty.toString(), ty.length==19
2850{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2851}}}}}}
2852{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2853{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2854}}}{{{#!if ty=ty.toString(), ty.length==19
2855{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2856}}}}}}{{{#!if ty=+ty
2857}}}}}}
2858{{{#!if ty>ab
2859{{{#!if tn-=1, ab+=+("1"+pd)
2860}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2861}}}}}}
2862{{{#!if !br
r249
2863{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2864{{{#!if ps=true, tw=0
r243
2865}}}}}}
2866{{{#!if !ps
2867{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2868}}}{{{#!if ty=ty.toString(), ty.length==19
2869{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2870}}}}}}
2871{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2872{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2873}}}{{{#!if ty=ty.toString(), ty.length==19
2874{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2875}}}}}}{{{#!if ty=+ty
2876}}}}}}
r256
2877{{{#!if ty>ab
r243
2878{{{#!if au-=1, ab+=+("1"+pd)
2879}}}}}}{{{#!if au-=tx, ab-=ty
r256
2880}}}}}}
2881{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2882}}}
2883{{{#!if (au==0)&&(ab==0)
2884{{{#!if br=true
2885}}}}}}}}}
2886{{{#!if !br
2887{{{#!if au=au.toString(), ab=ab.toString()
r252
2888}}}{{{#!if tn="", ps=(au.length==18), ps
2889{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2890}}}}}}{{{#!if !ps&&(au.length<17)
2891{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2892}}}}}}{{{#!if ab.length<18
2893{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2894}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2895}}}}}}
r243
2896##i=28
2897{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2898{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2899}}}{{{#!if ty=ty.toString(), ty.length==19
2900{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2901}}}}}}
2902{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2903{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2904}}}{{{#!if ty=ty.toString(), ty.length==19
2905{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2906}}}}}}{{{#!if ty=+ty
2907}}}}}}
2908{{{#!if ty>ab
2909{{{#!if tn-=1, ab+=+("1"+pd)
2910}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2911}}}}}}
2912{{{#!if !br
r249
2913{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2914{{{#!if ps=true, tw=0
r243
2915}}}}}}
2916{{{#!if !ps
2917{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2918}}}{{{#!if ty=ty.toString(), ty.length==19
2919{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2920}}}}}}
2921{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2922{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2923}}}{{{#!if ty=ty.toString(), ty.length==19
2924{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2925}}}}}}{{{#!if ty=+ty
2926}}}}}}
r256
2927{{{#!if ty>ab
r243
2928{{{#!if au-=1, ab+=+("1"+pd)
2929}}}}}}{{{#!if au-=tx, ab-=ty
r256
2930}}}}}}
2931{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2932}}}
2933{{{#!if (au==0)&&(ab==0)
2934{{{#!if br=true
2935}}}}}}}}}
2936{{{#!if !br
2937{{{#!if au=au.toString(), ab=ab.toString()
r252
2938}}}{{{#!if tn="", ps=(au.length==18), ps
2939{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2940}}}}}}{{{#!if !ps&&(au.length<17)
2941{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2942}}}}}}{{{#!if ab.length<18
2943{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2944}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2945}}}}}}
r243
2946##i=29
2947{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2948{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2949}}}{{{#!if ty=ty.toString(), ty.length==19
2950{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2951}}}}}}
2952{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2953{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2954}}}{{{#!if ty=ty.toString(), ty.length==19
2955{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2956}}}}}}{{{#!if ty=+ty
2957}}}}}}
2958{{{#!if ty>ab
2959{{{#!if tn-=1, ab+=+("1"+pd)
2960}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2961}}}}}}
2962{{{#!if !br
r249
2963{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2964{{{#!if ps=true, tw=0
r243
2965}}}}}}
2966{{{#!if !ps
2967{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2968}}}{{{#!if ty=ty.toString(), ty.length==19
2969{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2970}}}}}}
2971{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2972{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2973}}}{{{#!if ty=ty.toString(), ty.length==19
2974{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2975}}}}}}{{{#!if ty=+ty
2976}}}}}}
r256
2977{{{#!if ty>ab
r243
2978{{{#!if au-=1, ab+=+("1"+pd)
2979}}}}}}{{{#!if au-=tx, ab-=ty
r256
2980}}}}}}
2981{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2982}}}
2983{{{#!if (au==0)&&(ab==0)
2984{{{#!if br=true
2985}}}}}}}}}
2986{{{#!if !br
2987{{{#!if au=au.toString(), ab=ab.toString()
r252
2988}}}{{{#!if tn="", ps=(au.length==18), ps
2989{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2990}}}}}}{{{#!if !ps&&(au.length<17)
2991{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2992}}}}}}{{{#!if ab.length<18
2993{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2994}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2995}}}}}}
r243
2996##i=30
2997{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2998{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2999}}}{{{#!if ty=ty.toString(), ty.length==19
3000{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3001}}}}}}
3002{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3003{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3004}}}{{{#!if ty=ty.toString(), ty.length==19
3005{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3006}}}}}}{{{#!if ty=+ty
3007}}}}}}
3008{{{#!if ty>ab
3009{{{#!if tn-=1, ab+=+("1"+pd)
3010}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3011}}}}}}
3012{{{#!if !br
r249
3013{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3014{{{#!if ps=true, tw=0
r243
3015}}}}}}
3016{{{#!if !ps
3017{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3018}}}{{{#!if ty=ty.toString(), ty.length==19
3019{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3020}}}}}}
3021{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3022{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3023}}}{{{#!if ty=ty.toString(), ty.length==19
3024{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3025}}}}}}{{{#!if ty=+ty
3026}}}}}}
r256
3027{{{#!if ty>ab
r243
3028{{{#!if au-=1, ab+=+("1"+pd)
3029}}}}}}{{{#!if au-=tx, ab-=ty
r256
3030}}}}}}
3031{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3032}}}
3033{{{#!if (au==0)&&(ab==0)
3034{{{#!if br=true
3035}}}}}}}}}
3036{{{#!if !br
3037{{{#!if au=au.toString(), ab=ab.toString()
r252
3038}}}{{{#!if tn="", ps=(au.length==18), ps
3039{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3040}}}}}}{{{#!if !ps&&(au.length<17)
3041{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3042}}}}}}{{{#!if ab.length<18
3043{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3044}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3045}}}}}}
r243
3046##i=31
3047{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3048{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3049}}}{{{#!if ty=ty.toString(), ty.length==19
3050{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3051}}}}}}
3052{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3053{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3054}}}{{{#!if ty=ty.toString(), ty.length==19
3055{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3056}}}}}}{{{#!if ty=+ty
3057}}}}}}
3058{{{#!if ty>ab
3059{{{#!if tn-=1, ab+=+("1"+pd)
3060}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3061}}}}}}
3062{{{#!if !br
r249
3063{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3064{{{#!if ps=true, tw=0
r243
3065}}}}}}
3066{{{#!if !ps
3067{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3068}}}{{{#!if ty=ty.toString(), ty.length==19
3069{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3070}}}}}}
3071{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3072{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3073}}}{{{#!if ty=ty.toString(), ty.length==19
3074{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3075}}}}}}{{{#!if ty=+ty
3076}}}}}}
r256
3077{{{#!if ty>ab
r243
3078{{{#!if au-=1, ab+=+("1"+pd)
3079}}}}}}{{{#!if au-=tx, ab-=ty
r256
3080}}}}}}
3081{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3082}}}
3083{{{#!if (au==0)&&(ab==0)
3084{{{#!if br=true
3085}}}}}}}}}
3086{{{#!if !br
3087{{{#!if au=au.toString(), ab=ab.toString()
r252
3088}}}{{{#!if tn="", ps=(au.length==18), ps
3089{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3090}}}}}}{{{#!if !ps&&(au.length<17)
3091{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3092}}}}}}{{{#!if ab.length<18
3093{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3094}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3095}}}}}}
r243
3096##i=32
3097{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3098{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3099}}}{{{#!if ty=ty.toString(), ty.length==19
3100{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3101}}}}}}
3102{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3103{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3104}}}{{{#!if ty=ty.toString(), ty.length==19
3105{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3106}}}}}}{{{#!if ty=+ty
3107}}}}}}
3108{{{#!if ty>ab
3109{{{#!if tn-=1, ab+=+("1"+pd)
3110}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3111}}}}}}
3112{{{#!if !br
r249
3113{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3114{{{#!if ps=true, tw=0
r243
3115}}}}}}
3116{{{#!if !ps
3117{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3118}}}{{{#!if ty=ty.toString(), ty.length==19
3119{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3120}}}}}}
3121{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3122{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3123}}}{{{#!if ty=ty.toString(), ty.length==19
3124{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3125}}}}}}{{{#!if ty=+ty
3126}}}}}}
r256
3127{{{#!if ty>ab
r243
3128{{{#!if au-=1, ab+=+("1"+pd)
3129}}}}}}{{{#!if au-=tx, ab-=ty
r256
3130}}}}}}
3131{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3132}}}
3133{{{#!if (au==0)&&(ab==0)
3134{{{#!if br=true
3135}}}}}}}}}
3136{{{#!if !br
3137{{{#!if au=au.toString(), ab=ab.toString()
r252
3138}}}{{{#!if tn="", ps=(au.length==18), ps
3139{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3140}}}}}}{{{#!if !ps&&(au.length<17)
3141{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3142}}}}}}{{{#!if ab.length<18
3143{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3144}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3145}}}}}}
r243
3146##i=33
3147{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3148{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3149}}}{{{#!if ty=ty.toString(), ty.length==19
3150{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3151}}}}}}
3152{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3153{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3154}}}{{{#!if ty=ty.toString(), ty.length==19
3155{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3156}}}}}}{{{#!if ty=+ty
3157}}}}}}
3158{{{#!if ty>ab
3159{{{#!if tn-=1, ab+=+("1"+pd)
3160}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3161}}}}}}
3162{{{#!if !br
r249
3163{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3164{{{#!if ps=true, tw=0
r243
3165}}}}}}
3166{{{#!if !ps
3167{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3168}}}{{{#!if ty=ty.toString(), ty.length==19
3169{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3170}}}}}}
3171{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3172{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3173}}}{{{#!if ty=ty.toString(), ty.length==19
3174{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3175}}}}}}{{{#!if ty=+ty
3176}}}}}}
r256
3177{{{#!if ty>ab
r243
3178{{{#!if au-=1, ab+=+("1"+pd)
3179}}}}}}{{{#!if au-=tx, ab-=ty
r256
3180}}}}}}
3181{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3182}}}
3183{{{#!if (au==0)&&(ab==0)
3184{{{#!if br=true
3185}}}}}}}}}
3186{{{#!if !br
3187{{{#!if au=au.toString(), ab=ab.toString()
r252
3188}}}{{{#!if tn="", ps=(au.length==18), ps
3189{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3190}}}}}}{{{#!if !ps&&(au.length<17)
3191{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3192}}}}}}{{{#!if ab.length<18
3193{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3194}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3195}}}}}}
r243
3196##i=34
3197{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3198{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3199}}}{{{#!if ty=ty.toString(), ty.length==19
3200{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3201}}}}}}
3202{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3203{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3204}}}{{{#!if ty=ty.toString(), ty.length==19
3205{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3206}}}}}}{{{#!if ty=+ty
3207}}}}}}
3208{{{#!if ty>ab
3209{{{#!if tn-=1, ab+=+("1"+pd)
3210}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3211}}}}}}
3212{{{#!if !br
r249
3213{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3214{{{#!if ps=true, tw=0
r243
3215}}}}}}
3216{{{#!if !ps
3217{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3218}}}{{{#!if ty=ty.toString(), ty.length==19
3219{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3220}}}}}}
3221{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3222{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3223}}}{{{#!if ty=ty.toString(), ty.length==19
3224{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3225}}}}}}{{{#!if ty=+ty
3226}}}}}}
r256
3227{{{#!if ty>ab
r243
3228{{{#!if au-=1, ab+=+("1"+pd)
3229}}}}}}{{{#!if au-=tx, ab-=ty
r256
3230}}}}}}
3231{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3232}}}
3233{{{#!if (au==0)&&(ab==0)
3234{{{#!if br=true
3235}}}}}}}}}
3236{{{#!if !br
3237{{{#!if au=au.toString(), ab=ab.toString()
r252
3238}}}{{{#!if tn="", ps=(au.length==18), ps
3239{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3240}}}}}}{{{#!if !ps&&(au.length<17)
3241{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3242}}}}}}{{{#!if ab.length<18
3243{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3244}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3245}}}}}}
r243
3246##i=35
3247{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3248{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3249}}}{{{#!if ty=ty.toString(), ty.length==19
3250{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3251}}}}}}
3252{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3253{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3254}}}{{{#!if ty=ty.toString(), ty.length==19
3255{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3256}}}}}}{{{#!if ty=+ty
3257}}}}}}
3258{{{#!if ty>ab
3259{{{#!if tn-=1, ab+=+("1"+pd)
3260}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3261}}}}}}
3262{{{#!if !br
r249
3263{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3264{{{#!if ps=true, tw=0
r243
3265}}}}}}
3266{{{#!if !ps
3267{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3268}}}{{{#!if ty=ty.toString(), ty.length==19
3269{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3270}}}}}}
3271{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3272{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3273}}}{{{#!if ty=ty.toString(), ty.length==19
3274{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3275}}}}}}{{{#!if ty=+ty
3276}}}}}}
r256
3277{{{#!if ty>ab
r243
3278{{{#!if au-=1, ab+=+("1"+pd)
3279}}}}}}{{{#!if au-=tx, ab-=ty
r256
3280}}}}}}
3281{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3282}}}
3283{{{#!if (au==0)&&(ab==0)
3284{{{#!if br=true
3285}}}}}}}}}
3286{{{#!if !br
3287{{{#!if au=au.toString(), ab=ab.toString()
r252
3288}}}{{{#!if tn="", ps=(au.length==18), ps
3289{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3290}}}}}}{{{#!if !ps&&(au.length<17)
3291{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3292}}}}}}{{{#!if ab.length<18
3293{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3294}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3295}}}}}}
r243
3296##i=36
3297{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3298{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3299}}}{{{#!if ty=ty.toString(), ty.length==19
3300{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3301}}}}}}
3302{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3303{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3304}}}{{{#!if ty=ty.toString(), ty.length==19
3305{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3306}}}}}}{{{#!if ty=+ty
3307}}}}}}
3308{{{#!if ty>ab
3309{{{#!if tn-=1, ab+=+("1"+pd)
3310}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3311}}}}}}
3312{{{#!if !br
r249
3313{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3314{{{#!if ps=true, tw=0
r243
3315}}}}}}
3316{{{#!if !ps
3317{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3318}}}{{{#!if ty=ty.toString(), ty.length==19
3319{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3320}}}}}}
3321{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3322{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3323}}}{{{#!if ty=ty.toString(), ty.length==19
3324{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3325}}}}}}{{{#!if ty=+ty
3326}}}}}}
r256
3327{{{#!if ty>ab
r243
3328{{{#!if au-=1, ab+=+("1"+pd)
3329}}}}}}{{{#!if au-=tx, ab-=ty
r256
3330}}}}}}
3331{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3332}}}
3333{{{#!if (au==0)&&(ab==0)
3334{{{#!if br=true
3335}}}}}}}}}
3336{{{#!if !br
3337{{{#!if au=au.toString(), ab=ab.toString()
r252
3338}}}{{{#!if tn="", ps=(au.length==18), ps
3339{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3340}}}}}}{{{#!if !ps&&(au.length<17)
3341{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3342}}}}}}{{{#!if ab.length<18
3343{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3344}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3345}}}}}}
r243
3346##i=37
3347{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3348{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3349}}}{{{#!if ty=ty.toString(), ty.length==19
3350{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3351}}}}}}
3352{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3353{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3354}}}{{{#!if ty=ty.toString(), ty.length==19
3355{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3356}}}}}}{{{#!if ty=+ty
3357}}}}}}
3358{{{#!if ty>ab
3359{{{#!if tn-=1, ab+=+("1"+pd)
3360}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3361}}}}}}
3362{{{#!if !br
r249
3363{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3364{{{#!if ps=true, tw=0
r243
3365}}}}}}
3366{{{#!if !ps
3367{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3368}}}{{{#!if ty=ty.toString(), ty.length==19
3369{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3370}}}}}}
3371{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3372{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3373}}}{{{#!if ty=ty.toString(), ty.length==19
3374{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3375}}}}}}{{{#!if ty=+ty
3376}}}}}}
r256
3377{{{#!if ty>ab
r243
3378{{{#!if au-=1, ab+=+("1"+pd)
3379}}}}}}{{{#!if au-=tx, ab-=ty
r256
3380}}}}}}
3381{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3382}}}
3383{{{#!if (au==0)&&(ab==0)
3384{{{#!if br=true
3385}}}}}}}}}
3386{{{#!if !br
3387{{{#!if au=au.toString(), ab=ab.toString()
r252
3388}}}{{{#!if tn="", ps=(au.length==18), ps
3389{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3390}}}}}}{{{#!if !ps&&(au.length<17)
3391{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3392}}}}}}{{{#!if ab.length<18
3393{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3394}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3395}}}}}}
r243
3396##i=38
3397{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3398{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3399}}}{{{#!if ty=ty.toString(), ty.length==19
3400{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3401}}}}}}
3402{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3403{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3404}}}{{{#!if ty=ty.toString(), ty.length==19
3405{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3406}}}}}}{{{#!if ty=+ty
3407}}}}}}
3408{{{#!if ty>ab
3409{{{#!if tn-=1, ab+=+("1"+pd)
3410}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3411}}}}}}
3412{{{#!if !br
r249
3413{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3414{{{#!if ps=true, tw=0
r243
3415}}}}}}
3416{{{#!if !ps
3417{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3418}}}{{{#!if ty=ty.toString(), ty.length==19
3419{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3420}}}}}}
3421{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3422{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3423}}}{{{#!if ty=ty.toString(), ty.length==19
3424{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3425}}}}}}{{{#!if ty=+ty
3426}}}}}}
r256
3427{{{#!if ty>ab
r243
3428{{{#!if au-=1, ab+=+("1"+pd)
3429}}}}}}{{{#!if au-=tx, ab-=ty
r256
3430}}}}}}
3431{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3432}}}
3433{{{#!if (au==0)&&(ab==0)
3434{{{#!if br=true
3435}}}}}}}}}
3436{{{#!if !br
3437{{{#!if au=au.toString(), ab=ab.toString()
r252
3438}}}{{{#!if tn="", ps=(au.length==18), ps
3439{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3440}}}}}}{{{#!if !ps&&(au.length<17)
3441{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3442}}}}}}{{{#!if ab.length<18
3443{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3444}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3445}}}}}}
r243
3446##i=39
3447{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3448{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3449}}}{{{#!if ty=ty.toString(), ty.length==19
3450{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3451}}}}}}
3452{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3453{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3454}}}{{{#!if ty=ty.toString(), ty.length==19
3455{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3456}}}}}}{{{#!if ty=+ty
3457}}}}}}
3458{{{#!if ty>ab
3459{{{#!if tn-=1, ab+=+("1"+pd)
3460}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3461}}}}}}
3462{{{#!if !br
r249
3463{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3464{{{#!if ps=true, tw=0
r243
3465}}}}}}
3466{{{#!if !ps
3467{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3468}}}{{{#!if ty=ty.toString(), ty.length==19
3469{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3470}}}}}}
3471{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3472{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3473}}}{{{#!if ty=ty.toString(), ty.length==19
3474{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3475}}}}}}{{{#!if ty=+ty
3476}}}}}}
r256
3477{{{#!if ty>ab
r243
3478{{{#!if au-=1, ab+=+("1"+pd)
3479}}}}}}{{{#!if au-=tx, ab-=ty
r256
3480}}}}}}
3481{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3482}}}
3483{{{#!if (au==0)&&(ab==0)
3484{{{#!if br=true
3485}}}}}}}}}
3486{{{#!if !br
3487{{{#!if au=au.toString(), ab=ab.toString()
r252
3488}}}{{{#!if tn="", ps=(au.length==18), ps
3489{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3490}}}}}}{{{#!if !ps&&(au.length<17)
3491{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3492}}}}}}{{{#!if ab.length<18
3493{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3494}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3495}}}}}}
r243
3496##i=40
3497{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3498{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3499}}}{{{#!if ty=ty.toString(), ty.length==19
3500{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3501}}}}}}
3502{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3503{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3504}}}{{{#!if ty=ty.toString(), ty.length==19
3505{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3506}}}}}}{{{#!if ty=+ty
3507}}}}}}
3508{{{#!if ty>ab
3509{{{#!if tn-=1, ab+=+("1"+pd)
3510}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3511}}}}}}
3512{{{#!if !br
r249
3513{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3514{{{#!if ps=true, tw=0
r243
3515}}}}}}
3516{{{#!if !ps
3517{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3518}}}{{{#!if ty=ty.toString(), ty.length==19
3519{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3520}}}}}}
3521{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3522{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3523}}}{{{#!if ty=ty.toString(), ty.length==19
3524{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3525}}}}}}{{{#!if ty=+ty
3526}}}}}}
r256
3527{{{#!if ty>ab
r243
3528{{{#!if au-=1, ab+=+("1"+pd)
3529}}}}}}{{{#!if au-=tx, ab-=ty
r256
3530}}}}}}
3531{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3532}}}
3533{{{#!if (au==0)&&(ab==0)
3534{{{#!if br=true
3535}}}}}}}}}
3536{{{#!if !br
3537{{{#!if au=au.toString(), ab=ab.toString()
r252
3538}}}{{{#!if tn="", ps=(au.length==18), ps
3539{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3540}}}}}}{{{#!if !ps&&(au.length<17)
3541{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3542}}}}}}{{{#!if ab.length<18
3543{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3544}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3545}}}}}}
r243
3546##i=41
3547{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3548{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3549}}}{{{#!if ty=ty.toString(), ty.length==19
3550{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3551}}}}}}
3552{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3553{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3554}}}{{{#!if ty=ty.toString(), ty.length==19
3555{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3556}}}}}}{{{#!if ty=+ty
3557}}}}}}
3558{{{#!if ty>ab
3559{{{#!if tn-=1, ab+=+("1"+pd)
3560}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3561}}}}}}
3562{{{#!if !br
r249
3563{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3564{{{#!if ps=true, tw=0
r243
3565}}}}}}
3566{{{#!if !ps
3567{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3568}}}{{{#!if ty=ty.toString(), ty.length==19
3569{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3570}}}}}}
3571{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3572{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3573}}}{{{#!if ty=ty.toString(), ty.length==19
3574{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3575}}}}}}{{{#!if ty=+ty
3576}}}}}}
r256
3577{{{#!if ty>ab
r243
3578{{{#!if au-=1, ab+=+("1"+pd)
3579}}}}}}{{{#!if au-=tx, ab-=ty
r256
3580}}}}}}
3581{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3582}}}
3583{{{#!if (au==0)&&(ab==0)
3584{{{#!if br=true
3585}}}}}}}}}
3586{{{#!if !br
3587{{{#!if au=au.toString(), ab=ab.toString()
r252
3588}}}{{{#!if tn="", ps=(au.length==18), ps
3589{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3590}}}}}}{{{#!if !ps&&(au.length<17)
3591{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3592}}}}}}{{{#!if ab.length<18
3593{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3594}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3595}}}}}}
r243
3596##i=42
3597{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3598{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3599}}}{{{#!if ty=ty.toString(), ty.length==19
3600{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3601}}}}}}
3602{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3603{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3604}}}{{{#!if ty=ty.toString(), ty.length==19
3605{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3606}}}}}}{{{#!if ty=+ty
3607}}}}}}
3608{{{#!if ty>ab
3609{{{#!if tn-=1, ab+=+("1"+pd)
3610}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3611}}}}}}
3612{{{#!if !br
r249
3613{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3614{{{#!if ps=true, tw=0
r243
3615}}}}}}
3616{{{#!if !ps
3617{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3618}}}{{{#!if ty=ty.toString(), ty.length==19
3619{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3620}}}}}}
3621{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3622{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3623}}}{{{#!if ty=ty.toString(), ty.length==19
3624{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3625}}}}}}{{{#!if ty=+ty
3626}}}}}}
r256
3627{{{#!if ty>ab
r243
3628{{{#!if au-=1, ab+=+("1"+pd)
3629}}}}}}{{{#!if au-=tx, ab-=ty
r256
3630}}}}}}
3631{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3632}}}
3633{{{#!if (au==0)&&(ab==0)
3634{{{#!if br=true
3635}}}}}}}}}
3636{{{#!if !br
3637{{{#!if au=au.toString(), ab=ab.toString()
r252
3638}}}{{{#!if tn="", ps=(au.length==18), ps
3639{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3640}}}}}}{{{#!if !ps&&(au.length<17)
3641{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3642}}}}}}{{{#!if ab.length<18
3643{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3644}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3645}}}}}}
r243
3646##i=43
3647{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3648{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3649}}}{{{#!if ty=ty.toString(), ty.length==19
3650{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3651}}}}}}
3652{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3653{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3654}}}{{{#!if ty=ty.toString(), ty.length==19
3655{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3656}}}}}}{{{#!if ty=+ty
3657}}}}}}
3658{{{#!if ty>ab
3659{{{#!if tn-=1, ab+=+("1"+pd)
3660}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3661}}}}}}
3662{{{#!if !br
r249
3663{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3664{{{#!if ps=true, tw=0
r243
3665}}}}}}
3666{{{#!if !ps
3667{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3668}}}{{{#!if ty=ty.toString(), ty.length==19
3669{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3670}}}}}}
3671{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3672{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3673}}}{{{#!if ty=ty.toString(), ty.length==19
3674{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3675}}}}}}{{{#!if ty=+ty
3676}}}}}}
r256
3677{{{#!if ty>ab
r243
3678{{{#!if au-=1, ab+=+("1"+pd)
3679}}}}}}{{{#!if au-=tx, ab-=ty
r256
3680}}}}}}
3681{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3682}}}
3683{{{#!if (au==0)&&(ab==0)
3684{{{#!if br=true
3685}}}}}}}}}
3686{{{#!if !br
3687{{{#!if au=au.toString(), ab=ab.toString()
r252
3688}}}{{{#!if tn="", ps=(au.length==18), ps
3689{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3690}}}}}}{{{#!if !ps&&(au.length<17)
3691{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3692}}}}}}{{{#!if ab.length<18
3693{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3694}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3695}}}}}}
r243
3696##i=44
3697{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3698{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3699}}}{{{#!if ty=ty.toString(), ty.length==19
3700{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3701}}}}}}
3702{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3703{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3704}}}{{{#!if ty=ty.toString(), ty.length==19
3705{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3706}}}}}}{{{#!if ty=+ty
3707}}}}}}
3708{{{#!if ty>ab
3709{{{#!if tn-=1, ab+=+("1"+pd)
3710}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3711}}}}}}
3712{{{#!if !br
r249
3713{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3714{{{#!if ps=true, tw=0
r243
3715}}}}}}
3716{{{#!if !ps
3717{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3718}}}{{{#!if ty=ty.toString(), ty.length==19
3719{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3720}}}}}}
3721{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3722{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3723}}}{{{#!if ty=ty.toString(), ty.length==19
3724{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3725}}}}}}{{{#!if ty=+ty
3726}}}}}}
r256
3727{{{#!if ty>ab
r243
3728{{{#!if au-=1, ab+=+("1"+pd)
3729}}}}}}{{{#!if au-=tx, ab-=ty
r256
3730}}}}}}
3731{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3732}}}
3733{{{#!if (au==0)&&(ab==0)
3734{{{#!if br=true
3735}}}}}}}}}
3736{{{#!if !br
3737{{{#!if au=au.toString(), ab=ab.toString()
r252
3738}}}{{{#!if tn="", ps=(au.length==18), ps
3739{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3740}}}}}}{{{#!if !ps&&(au.length<17)
3741{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3742}}}}}}{{{#!if ab.length<18
3743{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3744}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3745}}}}}}
r243
3746##i=45
3747{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3748{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3749}}}{{{#!if ty=ty.toString(), ty.length==19
3750{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3751}}}}}}
3752{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3753{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3754}}}{{{#!if ty=ty.toString(), ty.length==19
3755{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3756}}}}}}{{{#!if ty=+ty
3757}}}}}}
3758{{{#!if ty>ab
3759{{{#!if tn-=1, ab+=+("1"+pd)
3760}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3761}}}}}}
3762{{{#!if !br
r249
3763{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3764{{{#!if ps=true, tw=0
r243
3765}}}}}}
3766{{{#!if !ps
3767{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3768}}}{{{#!if ty=ty.toString(), ty.length==19
3769{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3770}}}}}}
3771{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3772{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3773}}}{{{#!if ty=ty.toString(), ty.length==19
3774{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3775}}}}}}{{{#!if ty=+ty
3776}}}}}}
r256
3777{{{#!if ty>ab
r243
3778{{{#!if au-=1, ab+=+("1"+pd)
3779}}}}}}{{{#!if au-=tx, ab-=ty
r256
3780}}}}}}
3781{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3782}}}
3783{{{#!if (au==0)&&(ab==0)
3784{{{#!if br=true
3785}}}}}}}}}
3786{{{#!if !br
3787{{{#!if au=au.toString(), ab=ab.toString()
r252
3788}}}{{{#!if tn="", ps=(au.length==18), ps
3789{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3790}}}}}}{{{#!if !ps&&(au.length<17)
3791{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3792}}}}}}{{{#!if ab.length<18
3793{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3794}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3795}}}}}}
r243
3796##i=46
3797{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3798{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3799}}}{{{#!if ty=ty.toString(), ty.length==19
3800{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3801}}}}}}
3802{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3803{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3804}}}{{{#!if ty=ty.toString(), ty.length==19
3805{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3806}}}}}}{{{#!if ty=+ty
3807}}}}}}
3808{{{#!if ty>ab
3809{{{#!if tn-=1, ab+=+("1"+pd)
3810}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3811}}}}}}
3812{{{#!if !br
r249
3813{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3814{{{#!if ps=true, tw=0
r243
3815}}}}}}
3816{{{#!if !ps
3817{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3818}}}{{{#!if ty=ty.toString(), ty.length==19
3819{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3820}}}}}}
3821{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3822{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3823}}}{{{#!if ty=ty.toString(), ty.length==19
3824{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3825}}}}}}{{{#!if ty=+ty
3826}}}}}}
r256
3827{{{#!if ty>ab
r243
3828{{{#!if au-=1, ab+=+("1"+pd)
3829}}}}}}{{{#!if au-=tx, ab-=ty
r256
3830}}}}}}
3831{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3832}}}
3833{{{#!if (au==0)&&(ab==0)
3834{{{#!if br=true
3835}}}}}}}}}
3836{{{#!if !br
3837{{{#!if au=au.toString(), ab=ab.toString()
r252
3838}}}{{{#!if tn="", ps=(au.length==18), ps
3839{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3840}}}}}}{{{#!if !ps&&(au.length<17)
3841{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3842}}}}}}{{{#!if ab.length<18
3843{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3844}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3845}}}}}}
r243
3846##i=47
3847{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3848{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3849}}}{{{#!if ty=ty.toString(), ty.length==19
3850{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3851}}}}}}
3852{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3853{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3854}}}{{{#!if ty=ty.toString(), ty.length==19
3855{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3856}}}}}}{{{#!if ty=+ty
3857}}}}}}
3858{{{#!if ty>ab
3859{{{#!if tn-=1, ab+=+("1"+pd)
3860}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3861}}}}}}
3862{{{#!if !br
r249
3863{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3864{{{#!if ps=true, tw=0
r243
3865}}}}}}
3866{{{#!if !ps
3867{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3868}}}{{{#!if ty=ty.toString(), ty.length==19
3869{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3870}}}}}}
3871{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3872{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3873}}}{{{#!if ty=ty.toString(), ty.length==19
3874{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3875}}}}}}{{{#!if ty=+ty
3876}}}}}}
r256
3877{{{#!if ty>ab
r243
3878{{{#!if au-=1, ab+=+("1"+pd)
3879}}}}}}{{{#!if au-=tx, ab-=ty
r256
3880}}}}}}
3881{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3882}}}
3883{{{#!if (au==0)&&(ab==0)
3884{{{#!if br=true
3885}}}}}}}}}
3886{{{#!if !br
3887{{{#!if au=au.toString(), ab=ab.toString()
r252
3888}}}{{{#!if tn="", ps=(au.length==18), ps
3889{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3890}}}}}}{{{#!if !ps&&(au.length<17)
3891{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3892}}}}}}{{{#!if ab.length<18
3893{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3894}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3895}}}}}}
r243
3896##i=48
3897{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3898{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3899}}}{{{#!if ty=ty.toString(), ty.length==19
3900{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3901}}}}}}
3902{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3903{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3904}}}{{{#!if ty=ty.toString(), ty.length==19
3905{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3906}}}}}}{{{#!if ty=+ty
3907}}}}}}
3908{{{#!if ty>ab
3909{{{#!if tn-=1, ab+=+("1"+pd)
3910}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3911}}}}}}
3912{{{#!if !br
r249
3913{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3914{{{#!if ps=true, tw=0
r243
3915}}}}}}
3916{{{#!if !ps
3917{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3918}}}{{{#!if ty=ty.toString(), ty.length==19
3919{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3920}}}}}}
3921{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3922{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3923}}}{{{#!if ty=ty.toString(), ty.length==19
3924{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3925}}}}}}{{{#!if ty=+ty
3926}}}}}}
r256
3927{{{#!if ty>ab
r243
3928{{{#!if au-=1, ab+=+("1"+pd)
3929}}}}}}{{{#!if au-=tx, ab-=ty
r256
3930}}}}}}
3931{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3932}}}
3933{{{#!if (au==0)&&(ab==0)
3934{{{#!if br=true
3935}}}}}}}}}
3936{{{#!if !br
3937{{{#!if au=au.toString(), ab=ab.toString()
r252
3938}}}{{{#!if tn="", ps=(au.length==18), ps
3939{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3940}}}}}}{{{#!if !ps&&(au.length<17)
3941{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3942}}}}}}{{{#!if ab.length<18
3943{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3944}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3945}}}}}}
r243
3946##i=49
3947{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3948{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3949}}}{{{#!if ty=ty.toString(), ty.length==19
3950{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3951}}}}}}
3952{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3953{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3954}}}{{{#!if ty=ty.toString(), ty.length==19
3955{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3956}}}}}}{{{#!if ty=+ty
3957}}}}}}
3958{{{#!if ty>ab
3959{{{#!if tn-=1, ab+=+("1"+pd)
3960}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3961}}}}}}
3962{{{#!if !br
r249
3963{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3964{{{#!if ps=true, tw=0
r243
3965}}}}}}
3966{{{#!if !ps
3967{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3968}}}{{{#!if ty=ty.toString(), ty.length==19
3969{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3970}}}}}}
3971{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3972{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3973}}}{{{#!if ty=ty.toString(), ty.length==19
3974{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3975}}}}}}{{{#!if ty=+ty
3976}}}}}}
r256
3977{{{#!if ty>ab
r243
3978{{{#!if au-=1, ab+=+("1"+pd)
3979}}}}}}{{{#!if au-=tx, ab-=ty
r256
3980}}}}}}
3981{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3982}}}
3983{{{#!if (au==0)&&(ab==0)
3984{{{#!if br=true
3985}}}}}}}}}
3986{{{#!if !br
3987{{{#!if au=au.toString(), ab=ab.toString()
r252
3988}}}{{{#!if tn="", ps=(au.length==18), ps
3989{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3990}}}}}}{{{#!if !ps&&(au.length<17)
3991{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3992}}}}}}{{{#!if ab.length<18
3993{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3994}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3995}}}}}}
r243
3996##i=50
3997{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3998{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3999}}}{{{#!if ty=ty.toString(), ty.length==19
4000{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4001}}}}}}
4002{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4003{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4004}}}{{{#!if ty=ty.toString(), ty.length==19
4005{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4006}}}}}}{{{#!if ty=+ty
4007}}}}}}
4008{{{#!if ty>ab
4009{{{#!if tn-=1, ab+=+("1"+pd)
4010}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4011}}}}}}
4012{{{#!if !br
r249
4013{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4014{{{#!if ps=true, tw=0
r243
4015}}}}}}
4016{{{#!if !ps
4017{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4018}}}{{{#!if ty=ty.toString(), ty.length==19
4019{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4020}}}}}}
4021{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4022{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4023}}}{{{#!if ty=ty.toString(), ty.length==19
4024{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4025}}}}}}{{{#!if ty=+ty
4026}}}}}}
r256
4027{{{#!if ty>ab
r243
4028{{{#!if au-=1, ab+=+("1"+pd)
4029}}}}}}{{{#!if au-=tx, ab-=ty
r256
4030}}}}}}
4031{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4032}}}
4033{{{#!if (au==0)&&(ab==0)
4034{{{#!if br=true
4035}}}}}}}}}
4036{{{#!if !br
4037{{{#!if au=au.toString(), ab=ab.toString()
r252
4038}}}{{{#!if tn="", ps=(au.length==18), ps
4039{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4040}}}}}}{{{#!if !ps&&(au.length<17)
4041{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4042}}}}}}{{{#!if ab.length<18
4043{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4044}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4045}}}}}}
r243
4046##i=51
4047{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4048{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4049}}}{{{#!if ty=ty.toString(), ty.length==19
4050{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4051}}}}}}
4052{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4053{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4054}}}{{{#!if ty=ty.toString(), ty.length==19
4055{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4056}}}}}}{{{#!if ty=+ty
4057}}}}}}
4058{{{#!if ty>ab
4059{{{#!if tn-=1, ab+=+("1"+pd)
4060}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4061}}}}}}
4062{{{#!if !br
r249
4063{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4064{{{#!if ps=true, tw=0
r243
4065}}}}}}
4066{{{#!if !ps
4067{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4068}}}{{{#!if ty=ty.toString(), ty.length==19
4069{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4070}}}}}}
4071{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4072{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4073}}}{{{#!if ty=ty.toString(), ty.length==19
4074{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4075}}}}}}{{{#!if ty=+ty
4076}}}}}}
r256
4077{{{#!if ty>ab
r243
4078{{{#!if au-=1, ab+=+("1"+pd)
4079}}}}}}{{{#!if au-=tx, ab-=ty
r256
4080}}}}}}
4081{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4082}}}
4083{{{#!if (au==0)&&(ab==0)
4084{{{#!if br=true
4085}}}}}}}}}
4086{{{#!if !br
4087{{{#!if au=au.toString(), ab=ab.toString()
r252
4088}}}{{{#!if tn="", ps=(au.length==18), ps
4089{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4090}}}}}}{{{#!if !ps&&(au.length<17)
4091{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4092}}}}}}{{{#!if ab.length<18
4093{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4094}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4095}}}}}}
r243
4096##i=52
4097{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4098{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4099}}}{{{#!if ty=ty.toString(), ty.length==19
4100{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4101}}}}}}
4102{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4103{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4104}}}{{{#!if ty=ty.toString(), ty.length==19
4105{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4106}}}}}}{{{#!if ty=+ty
4107}}}}}}
4108{{{#!if ty>ab
4109{{{#!if tn-=1, ab+=+("1"+pd)
4110}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4111}}}}}}
4112{{{#!if !br
r249
4113{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4114{{{#!if ps=true, tw=0
r243
4115}}}}}}
4116{{{#!if !ps
4117{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4118}}}{{{#!if ty=ty.toString(), ty.length==19
4119{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4120}}}}}}
4121{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4122{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4123}}}{{{#!if ty=ty.toString(), ty.length==19
4124{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4125}}}}}}{{{#!if ty=+ty
4126}}}}}}
r256
4127{{{#!if ty>ab
r243
4128{{{#!if au-=1, ab+=+("1"+pd)
4129}}}}}}{{{#!if au-=tx, ab-=ty
r256
4130}}}}}}
4131{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4132}}}
4133{{{#!if (au==0)&&(ab==0)
4134{{{#!if br=true
4135}}}}}}}}}
4136{{{#!if !br
4137{{{#!if au=au.toString(), ab=ab.toString()
r252
4138}}}{{{#!if tn="", ps=(au.length==18), ps
4139{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4140}}}}}}{{{#!if !ps&&(au.length<17)
4141{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4142}}}}}}{{{#!if ab.length<18
4143{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4144}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4145}}}}}}
r243
4146##i=53
4147{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4148{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4149}}}{{{#!if ty=ty.toString(), ty.length==19
4150{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4151}}}}}}
4152{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4153{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4154}}}{{{#!if ty=ty.toString(), ty.length==19
4155{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4156}}}}}}{{{#!if ty=+ty
4157}}}}}}
4158{{{#!if ty>ab
4159{{{#!if tn-=1, ab+=+("1"+pd)
4160}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4161}}}}}}
4162{{{#!if !br
r249
4163{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4164{{{#!if ps=true, tw=0
r243
4165}}}}}}
4166{{{#!if !ps
4167{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4168}}}{{{#!if ty=ty.toString(), ty.length==19
4169{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4170}}}}}}
4171{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4172{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4173}}}{{{#!if ty=ty.toString(), ty.length==19
4174{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4175}}}}}}{{{#!if ty=+ty
4176}}}}}}
r256
4177{{{#!if ty>ab
r243
4178{{{#!if au-=1, ab+=+("1"+pd)
4179}}}}}}{{{#!if au-=tx, ab-=ty
r256
4180}}}}}}
4181{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4182}}}
4183{{{#!if (au==0)&&(ab==0)
4184{{{#!if br=true
4185}}}}}}}}}
4186{{{#!if !br
4187{{{#!if au=au.toString(), ab=ab.toString()
r252
4188}}}{{{#!if tn="", ps=(au.length==18), ps
4189{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4190}}}}}}{{{#!if !ps&&(au.length<17)
4191{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4192}}}}}}{{{#!if ab.length<18
4193{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4194}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4195}}}}}}
r243
4196##i=54
4197{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4198{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4199}}}{{{#!if ty=ty.toString(), ty.length==19
4200{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4201}}}}}}
4202{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4203{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4204}}}{{{#!if ty=ty.toString(), ty.length==19
4205{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4206}}}}}}{{{#!if ty=+ty
4207}}}}}}
4208{{{#!if ty>ab
4209{{{#!if tn-=1, ab+=+("1"+pd)
4210}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4211}}}}}}
4212{{{#!if !br
r249
4213{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4214{{{#!if ps=true, tw=0
r243
4215}}}}}}
4216{{{#!if !ps
4217{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4218}}}{{{#!if ty=ty.toString(), ty.length==19
4219{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4220}}}}}}
4221{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4222{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4223}}}{{{#!if ty=ty.toString(), ty.length==19
4224{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4225}}}}}}{{{#!if ty=+ty
4226}}}}}}
r256
4227{{{#!if ty>ab
r243
4228{{{#!if au-=1, ab+=+("1"+pd)
4229}}}}}}{{{#!if au-=tx, ab-=ty
r256
4230}}}}}}
4231{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4232}}}
4233{{{#!if (au==0)&&(ab==0)
4234{{{#!if br=true
4235}}}}}}}}}
4236{{{#!if !br
4237{{{#!if au=au.toString(), ab=ab.toString()
r252
4238}}}{{{#!if tn="", ps=(au.length==18), ps
4239{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4240}}}}}}{{{#!if !ps&&(au.length<17)
4241{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4242}}}}}}{{{#!if ab.length<18
4243{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4244}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4245}}}}}}
r243
4246##i=55
4247{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4248{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4249}}}{{{#!if ty=ty.toString(), ty.length==19
4250{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4251}}}}}}
4252{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4253{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4254}}}{{{#!if ty=ty.toString(), ty.length==19
4255{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4256}}}}}}{{{#!if ty=+ty
4257}}}}}}
4258{{{#!if ty>ab
4259{{{#!if tn-=1, ab+=+("1"+pd)
4260}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4261}}}}}}
4262{{{#!if !br
r249
4263{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4264{{{#!if ps=true, tw=0
r243
4265}}}}}}
4266{{{#!if !ps
4267{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4268}}}{{{#!if ty=ty.toString(), ty.length==19
4269{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4270}}}}}}
4271{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4272{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4273}}}{{{#!if ty=ty.toString(), ty.length==19
4274{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4275}}}}}}{{{#!if ty=+ty
4276}}}}}}
r256
4277{{{#!if ty>ab
r243
4278{{{#!if au-=1, ab+=+("1"+pd)
4279}}}}}}{{{#!if au-=tx, ab-=ty
r256
4280}}}}}}
4281{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4282}}}
4283{{{#!if (au==0)&&(ab==0)
4284{{{#!if br=true
4285}}}}}}}}}
4286{{{#!if !br
4287{{{#!if au=au.toString(), ab=ab.toString()
r252
4288}}}{{{#!if tn="", ps=(au.length==18), ps
4289{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4290}}}}}}{{{#!if !ps&&(au.length<17)
4291{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4292}}}}}}{{{#!if ab.length<18
4293{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4294}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4295}}}}}}
r243
4296##i=56
4297{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4298{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4299}}}{{{#!if ty=ty.toString(), ty.length==19
4300{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4301}}}}}}
4302{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4303{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4304}}}{{{#!if ty=ty.toString(), ty.length==19
4305{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4306}}}}}}{{{#!if ty=+ty
4307}}}}}}
4308{{{#!if ty>ab
4309{{{#!if tn-=1, ab+=+("1"+pd)
4310}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4311}}}}}}
4312{{{#!if !br
r249
4313{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4314{{{#!if ps=true, tw=0
r243
4315}}}}}}
4316{{{#!if !ps
4317{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4318}}}{{{#!if ty=ty.toString(), ty.length==19
4319{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4320}}}}}}
4321{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4322{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4323}}}{{{#!if ty=ty.toString(), ty.length==19
4324{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4325}}}}}}{{{#!if ty=+ty
4326}}}}}}
r256
4327{{{#!if ty>ab
r243
4328{{{#!if au-=1, ab+=+("1"+pd)
4329}}}}}}{{{#!if au-=tx, ab-=ty
r256
4330}}}}}}
4331{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4332}}}
4333{{{#!if (au==0)&&(ab==0)
4334{{{#!if br=true
4335}}}}}}}}}
4336{{{#!if !br
4337{{{#!if au=au.toString(), ab=ab.toString()
r252
4338}}}{{{#!if tn="", ps=(au.length==18), ps
4339{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4340}}}}}}{{{#!if !ps&&(au.length<17)
4341{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4342}}}}}}{{{#!if ab.length<18
4343{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4344}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4345}}}}}}
r243
4346##i=57
4347{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4348{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4349}}}{{{#!if ty=ty.toString(), ty.length==19
4350{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4351}}}}}}
4352{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4353{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4354}}}{{{#!if ty=ty.toString(), ty.length==19
4355{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4356}}}}}}{{{#!if ty=+ty
4357}}}}}}
4358{{{#!if ty>ab
4359{{{#!if tn-=1, ab+=+("1"+pd)
4360}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4361}}}}}}
4362{{{#!if !br
r249
4363{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4364{{{#!if ps=true, tw=0
r243
4365}}}}}}
4366{{{#!if !ps
4367{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4368}}}{{{#!if ty=ty.toString(), ty.length==19
4369{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4370}}}}}}
4371{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4372{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4373}}}{{{#!if ty=ty.toString(), ty.length==19
4374{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4375}}}}}}{{{#!if ty=+ty
4376}}}}}}
r256
4377{{{#!if ty>ab
r243
4378{{{#!if au-=1, ab+=+("1"+pd)
4379}}}}}}{{{#!if au-=tx, ab-=ty
r256
4380}}}}}}
4381{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4382}}}
4383{{{#!if (au==0)&&(ab==0)
4384{{{#!if br=true
4385}}}}}}}}}
4386{{{#!if !br
4387{{{#!if au=au.toString(), ab=ab.toString()
r252
4388}}}{{{#!if tn="", ps=(au.length==18), ps
4389{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4390}}}}}}{{{#!if !ps&&(au.length<17)
4391{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4392}}}}}}{{{#!if ab.length<18
4393{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4394}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4395}}}}}}
r243
4396##i=58
4397{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4398{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4399}}}{{{#!if ty=ty.toString(), ty.length==19
4400{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4401}}}}}}
4402{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4403{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4404}}}{{{#!if ty=ty.toString(), ty.length==19
4405{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4406}}}}}}{{{#!if ty=+ty
4407}}}}}}
4408{{{#!if ty>ab
4409{{{#!if tn-=1, ab+=+("1"+pd)
4410}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4411}}}}}}
4412{{{#!if !br
r249
4413{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4414{{{#!if ps=true, tw=0
r243
4415}}}}}}
4416{{{#!if !ps
4417{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4418}}}{{{#!if ty=ty.toString(), ty.length==19
4419{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4420}}}}}}
4421{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4422{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4423}}}{{{#!if ty=ty.toString(), ty.length==19
4424{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4425}}}}}}{{{#!if ty=+ty
4426}}}}}}
r256
4427{{{#!if ty>ab
r243
4428{{{#!if au-=1, ab+=+("1"+pd)
4429}}}}}}{{{#!if au-=tx, ab-=ty
r256
4430}}}}}}
4431{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4432}}}
4433{{{#!if (au==0)&&(ab==0)
4434{{{#!if br=true
4435}}}}}}}}}
4436{{{#!if !br
4437{{{#!if au=au.toString(), ab=ab.toString()
r252
4438}}}{{{#!if tn="", ps=(au.length==18), ps
4439{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4440}}}}}}{{{#!if !ps&&(au.length<17)
4441{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4442}}}}}}{{{#!if ab.length<18
4443{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4444}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4445}}}}}}
r243
4446##i=59
4447{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4448{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4449}}}{{{#!if ty=ty.toString(), ty.length==19
4450{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4451}}}}}}
4452{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4453{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4454}}}{{{#!if ty=ty.toString(), ty.length==19
4455{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4456}}}}}}{{{#!if ty=+ty
4457}}}}}}
4458{{{#!if ty>ab
4459{{{#!if tn-=1, ab+=+("1"+pd)
4460}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4461}}}}}}
4462{{{#!if !br
r249
4463{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4464{{{#!if ps=true, tw=0
r243
4465}}}}}}
4466{{{#!if !ps
4467{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4468}}}{{{#!if ty=ty.toString(), ty.length==19
4469{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4470}}}}}}
4471{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4472{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4473}}}{{{#!if ty=ty.toString(), ty.length==19
4474{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4475}}}}}}{{{#!if ty=+ty
4476}}}}}}
r256
4477{{{#!if ty>ab
r243
4478{{{#!if au-=1, ab+=+("1"+pd)
4479}}}}}}{{{#!if au-=tx, ab-=ty
r256
4480}}}}}}
4481{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4482}}}
4483{{{#!if (au==0)&&(ab==0)
4484{{{#!if br=true
4485}}}}}}}}}
4486{{{#!if !br
4487{{{#!if au=au.toString(), ab=ab.toString()
r252
4488}}}{{{#!if tn="", ps=(au.length==18), ps
4489{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4490}}}}}}{{{#!if !ps&&(au.length<17)
4491{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4492}}}}}}{{{#!if ab.length<18
4493{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4494}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4495}}}}}}
r243
4496##i=60
4497{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4498{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4499}}}{{{#!if ty=ty.toString(), ty.length==19
4500{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4501}}}}}}
4502{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4503{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4504}}}{{{#!if ty=ty.toString(), ty.length==19
4505{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4506}}}}}}{{{#!if ty=+ty
4507}}}}}}
4508{{{#!if ty>ab
4509{{{#!if tn-=1, ab+=+("1"+pd)
4510}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4511}}}}}}
4512{{{#!if !br
r249
4513{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4514{{{#!if ps=true, tw=0
r243
4515}}}}}}
4516{{{#!if !ps
4517{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4518}}}{{{#!if ty=ty.toString(), ty.length==19
4519{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4520}}}}}}
4521{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4522{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4523}}}{{{#!if ty=ty.toString(), ty.length==19
4524{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4525}}}}}}{{{#!if ty=+ty
4526}}}}}}
r256
4527{{{#!if ty>ab
r243
4528{{{#!if au-=1, ab+=+("1"+pd)
4529}}}}}}{{{#!if au-=tx, ab-=ty
r256
4530}}}}}}
4531{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4532}}}
4533{{{#!if (au==0)&&(ab==0)
4534{{{#!if br=true
4535}}}}}}}}}
4536{{{#!if !br
4537{{{#!if au=au.toString(), ab=ab.toString()
r252
4538}}}{{{#!if tn="", ps=(au.length==18), ps
4539{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4540}}}}}}{{{#!if !ps&&(au.length<17)
4541{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4542}}}}}}{{{#!if ab.length<18
4543{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4544}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4545}}}}}}
r243
4546##i=61
4547{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4548{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4549}}}{{{#!if ty=ty.toString(), ty.length==19
4550{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4551}}}}}}
4552{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4553{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4554}}}{{{#!if ty=ty.toString(), ty.length==19
4555{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4556}}}}}}{{{#!if ty=+ty
4557}}}}}}
4558{{{#!if ty>ab
4559{{{#!if tn-=1, ab+=+("1"+pd)
4560}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4561}}}}}}
4562{{{#!if !br
r249
4563{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4564{{{#!if ps=true, tw=0
r243
4565}}}}}}
4566{{{#!if !ps
4567{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4568}}}{{{#!if ty=ty.toString(), ty.length==19
4569{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4570}}}}}}
4571{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4572{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4573}}}{{{#!if ty=ty.toString(), ty.length==19
4574{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4575}}}}}}{{{#!if ty=+ty
4576}}}}}}
r256
4577{{{#!if ty>ab
r243
4578{{{#!if au-=1, ab+=+("1"+pd)
4579}}}}}}{{{#!if au-=tx, ab-=ty
r256
4580}}}}}}
4581{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4582}}}
4583{{{#!if (au==0)&&(ab==0)
4584{{{#!if br=true
4585}}}}}}}}}
4586{{{#!if !br
4587{{{#!if au=au.toString(), ab=ab.toString()
r252
4588}}}{{{#!if tn="", ps=(au.length==18), ps
4589{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4590}}}}}}{{{#!if !ps&&(au.length<17)
4591{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4592}}}}}}{{{#!if ab.length<18
4593{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4594}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4595}}}}}}
r243
4596##i=62
4597{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4598{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4599}}}{{{#!if ty=ty.toString(), ty.length==19
4600{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4601}}}}}}
4602{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4603{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4604}}}{{{#!if ty=ty.toString(), ty.length==19
4605{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4606}}}}}}{{{#!if ty=+ty
4607}}}}}}
4608{{{#!if ty>ab
4609{{{#!if tn-=1, ab+=+("1"+pd)
4610}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4611}}}}}}
4612{{{#!if !br
r249
4613{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4614{{{#!if ps=true, tw=0
r243
4615}}}}}}
4616{{{#!if !ps
4617{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4618}}}{{{#!if ty=ty.toString(), ty.length==19
4619{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4620}}}}}}
4621{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4622{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4623}}}{{{#!if ty=ty.toString(), ty.length==19
4624{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4625}}}}}}{{{#!if ty=+ty
4626}}}}}}
r256
4627{{{#!if ty>ab
r243
4628{{{#!if au-=1, ab+=+("1"+pd)
4629}}}}}}{{{#!if au-=tx, ab-=ty
r256
4630}}}}}}
4631{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4632}}}
4633{{{#!if (au==0)&&(ab==0)
4634{{{#!if br=true
4635}}}}}}}}}
4636{{{#!if !br
4637{{{#!if au=au.toString(), ab=ab.toString()
r252
4638}}}{{{#!if tn="", ps=(au.length==18), ps
4639{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4640}}}}}}{{{#!if !ps&&(au.length<17)
4641{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4642}}}}}}{{{#!if ab.length<18
4643{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4644}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4645}}}}}}
r243
4646##i=63
4647{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4648{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4649}}}{{{#!if ty=ty.toString(), ty.length==19
4650{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4651}}}}}}
4652{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4653{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4654}}}{{{#!if ty=ty.toString(), ty.length==19
4655{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4656}}}}}}{{{#!if ty=+ty
4657}}}}}}
4658{{{#!if ty>ab
4659{{{#!if tn-=1, ab+=+("1"+pd)
4660}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4661}}}}}}
4662{{{#!if !br
r249
4663{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4664{{{#!if ps=true, tw=0
r243
4665}}}}}}
4666{{{#!if !ps
4667{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4668}}}{{{#!if ty=ty.toString(), ty.length==19
4669{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4670}}}}}}
4671{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4672{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4673}}}{{{#!if ty=ty.toString(), ty.length==19
4674{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4675}}}}}}{{{#!if ty=+ty
4676}}}}}}
r256
4677{{{#!if ty>ab
r243
4678{{{#!if au-=1, ab+=+("1"+pd)
4679}}}}}}{{{#!if au-=tx, ab-=ty
r256
4680}}}}}}
4681{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4682}}}
4683{{{#!if (au==0)&&(ab==0)
4684{{{#!if br=true
4685}}}}}}}}}
4686{{{#!if !br
4687{{{#!if au=au.toString(), ab=ab.toString()
r252
4688}}}{{{#!if tn="", ps=(au.length==18), ps
4689{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4690}}}}}}{{{#!if !ps&&(au.length<17)
4691{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4692}}}}}}{{{#!if ab.length<18
4693{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4694}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4695}}}}}}
r243
4696##i=64
4697{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4698{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4699}}}{{{#!if ty=ty.toString(), ty.length==19
4700{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4701}}}}}}
4702{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4703{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4704}}}{{{#!if ty=ty.toString(), ty.length==19
4705{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4706}}}}}}{{{#!if ty=+ty
4707}}}}}}
4708{{{#!if ty>ab
4709{{{#!if tn-=1, ab+=+("1"+pd)
4710}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4711}}}}}}
4712{{{#!if !br
r249
4713{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4714{{{#!if ps=true, tw=0
r243
4715}}}}}}
4716{{{#!if !ps
4717{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4718}}}{{{#!if ty=ty.toString(), ty.length==19
4719{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4720}}}}}}
4721{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4722{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4723}}}{{{#!if ty=ty.toString(), ty.length==19
4724{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4725}}}}}}{{{#!if ty=+ty
4726}}}}}}
r256
4727{{{#!if ty>ab
r243
4728{{{#!if au-=1, ab+=+("1"+pd)
4729}}}}}}{{{#!if au-=tx, ab-=ty
r256
4730}}}}}}
4731{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4732}}}
4733{{{#!if (au==0)&&(ab==0)
4734{{{#!if br=true
4735}}}}}}}}}
4736{{{#!if !br
4737{{{#!if au=au.toString(), ab=ab.toString()
r252
4738}}}{{{#!if tn="", ps=(au.length==18), ps
4739{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4740}}}}}}{{{#!if !ps&&(au.length<17)
4741{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4742}}}}}}{{{#!if ab.length<18
4743{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4744}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4745}}}}}}
r243
4746##i=65
4747{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4748{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4749}}}{{{#!if ty=ty.toString(), ty.length==19
4750{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4751}}}}}}
4752{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4753{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4754}}}{{{#!if ty=ty.toString(), ty.length==19
4755{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4756}}}}}}{{{#!if ty=+ty
4757}}}}}}
4758{{{#!if ty>ab
4759{{{#!if tn-=1, ab+=+("1"+pd)
4760}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4761}}}}}}
4762{{{#!if !br
r249
4763{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4764{{{#!if ps=true, tw=0
r243
4765}}}}}}
4766{{{#!if !ps
4767{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4768}}}{{{#!if ty=ty.toString(), ty.length==19
4769{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4770}}}}}}
4771{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4772{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4773}}}{{{#!if ty=ty.toString(), ty.length==19
4774{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4775}}}}}}{{{#!if ty=+ty
4776}}}}}}
r256
4777{{{#!if ty>ab
r243
4778{{{#!if au-=1, ab+=+("1"+pd)
4779}}}}}}{{{#!if au-=tx, ab-=ty
r256
4780}}}}}}
4781{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4782}}}
4783{{{#!if (au==0)&&(ab==0)
4784{{{#!if br=true
4785}}}}}}}}}
4786{{{#!if !br
4787{{{#!if au=au.toString(), ab=ab.toString()
r252
4788}}}{{{#!if tn="", ps=(au.length==18), ps
4789{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4790}}}}}}{{{#!if !ps&&(au.length<17)
4791{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4792}}}}}}{{{#!if ab.length<18
4793{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4794}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4795}}}}}}
r243
4796##i=66
4797{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4798{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4799}}}{{{#!if ty=ty.toString(), ty.length==19
4800{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4801}}}}}}
4802{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4803{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4804}}}{{{#!if ty=ty.toString(), ty.length==19
4805{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4806}}}}}}{{{#!if ty=+ty
4807}}}}}}
4808{{{#!if ty>ab
4809{{{#!if tn-=1, ab+=+("1"+pd)
4810}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4811}}}}}}
4812{{{#!if !br
r249
4813{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4814{{{#!if ps=true, tw=0
r243
4815}}}}}}
4816{{{#!if !ps
4817{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4818}}}{{{#!if ty=ty.toString(), ty.length==19
4819{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4820}}}}}}
4821{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4822{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4823}}}{{{#!if ty=ty.toString(), ty.length==19
4824{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4825}}}}}}{{{#!if ty=+ty
4826}}}}}}
r256
4827{{{#!if ty>ab
r243
4828{{{#!if au-=1, ab+=+("1"+pd)
4829}}}}}}{{{#!if au-=tx, ab-=ty
r256
4830}}}}}}
4831{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4832}}}
4833{{{#!if (au==0)&&(ab==0)
4834{{{#!if br=true
4835}}}}}}}}}
4836{{{#!if !br
4837{{{#!if au=au.toString(), ab=ab.toString()
r252
4838}}}{{{#!if tn="", ps=(au.length==18), ps
4839{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4840}}}}}}{{{#!if !ps&&(au.length<17)
4841{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4842}}}}}}{{{#!if ab.length<18
4843{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4844}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4845}}}}}}
r243
4846##i=67
4847{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4848{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4849}}}{{{#!if ty=ty.toString(), ty.length==19
4850{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4851}}}}}}
4852{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4853{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4854}}}{{{#!if ty=ty.toString(), ty.length==19
4855{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4856}}}}}}{{{#!if ty=+ty
4857}}}}}}
4858{{{#!if ty>ab
4859{{{#!if tn-=1, ab+=+("1"+pd)
4860}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4861}}}}}}
4862{{{#!if !br
r249
4863{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4864{{{#!if ps=true, tw=0
r243
4865}}}}}}
4866{{{#!if !ps
4867{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4868}}}{{{#!if ty=ty.toString(), ty.length==19
4869{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4870}}}}}}
4871{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4872{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4873}}}{{{#!if ty=ty.toString(), ty.length==19
4874{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4875}}}}}}{{{#!if ty=+ty
4876}}}}}}
r256
4877{{{#!if ty>ab
r243
4878{{{#!if au-=1, ab+=+("1"+pd)
4879}}}}}}{{{#!if au-=tx, ab-=ty
r256
4880}}}}}}
4881{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4882}}}
4883{{{#!if (au==0)&&(ab==0)
4884{{{#!if br=true
4885}}}}}}}}}
4886{{{#!if !br
4887{{{#!if au=au.toString(), ab=ab.toString()
r252
4888}}}{{{#!if tn="", ps=(au.length==18), ps
4889{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4890}}}}}}{{{#!if !ps&&(au.length<17)
4891{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4892}}}}}}{{{#!if ab.length<18
4893{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4894}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4895}}}}}}
r243
4896##i=68
4897{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4898{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4899}}}{{{#!if ty=ty.toString(), ty.length==19
4900{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4901}}}}}}
4902{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4903{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4904}}}{{{#!if ty=ty.toString(), ty.length==19
4905{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4906}}}}}}{{{#!if ty=+ty
4907}}}}}}
4908{{{#!if ty>ab
4909{{{#!if tn-=1, ab+=+("1"+pd)
4910}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4911}}}}}}
4912{{{#!if !br
r249
4913{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4914{{{#!if ps=true, tw=0
r243
4915}}}}}}
4916{{{#!if !ps
4917{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4918}}}{{{#!if ty=ty.toString(), ty.length==19
4919{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4920}}}}}}
4921{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4922{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4923}}}{{{#!if ty=ty.toString(), ty.length==19
4924{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4925}}}}}}{{{#!if ty=+ty
4926}}}}}}
r256
4927{{{#!if ty>ab
r243
4928{{{#!if au-=1, ab+=+("1"+pd)
4929}}}}}}{{{#!if au-=tx, ab-=ty
r256
4930}}}}}}
4931{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4932}}}
4933{{{#!if (au==0)&&(ab==0)
4934{{{#!if br=true
4935}}}}}}}}}
4936{{{#!if !br
4937{{{#!if au=au.toString(), ab=ab.toString()
r252
4938}}}{{{#!if tn="", ps=(au.length==18), ps
4939{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4940}}}}}}{{{#!if !ps&&(au.length<17)
4941{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4942}}}}}}{{{#!if ab.length<18
4943{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4944}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4945}}}}}}
r243
4946##i=69
4947{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4948{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4949}}}{{{#!if ty=ty.toString(), ty.length==19
4950{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4951}}}}}}
4952{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4953{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4954}}}{{{#!if ty=ty.toString(), ty.length==19
4955{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4956}}}}}}{{{#!if ty=+ty
4957}}}}}}
4958{{{#!if ty>ab
4959{{{#!if tn-=1, ab+=+("1"+pd)
4960}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4961}}}}}}
4962{{{#!if !br
r249
4963{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4964{{{#!if ps=true, tw=0
r243
4965}}}}}}
4966{{{#!if !ps
4967{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4968}}}{{{#!if ty=ty.toString(), ty.length==19
4969{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4970}}}}}}
4971{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4972{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4973}}}{{{#!if ty=ty.toString(), ty.length==19
4974{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4975}}}}}}{{{#!if ty=+ty
4976}}}}}}
r256
4977{{{#!if ty>ab
r243
4978{{{#!if au-=1, ab+=+("1"+pd)
4979}}}}}}{{{#!if au-=tx, ab-=ty
r256
4980}}}}}}
4981{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4982}}}
4983{{{#!if (au==0)&&(ab==0)
4984{{{#!if br=true
4985}}}}}}}}}
4986{{{#!if !br
4987{{{#!if au=au.toString(), ab=ab.toString()
r252
4988}}}{{{#!if tn="", ps=(au.length==18), ps
4989{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4990}}}}}}{{{#!if !ps&&(au.length<17)
4991{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4992}}}}}}{{{#!if ab.length<18
4993{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4994}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4995}}}}}}
r243
4996##i=70
4997{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4998{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4999}}}{{{#!if ty=ty.toString(), ty.length==19
5000{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5001}}}}}}
5002{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
5003{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
5004}}}{{{#!if ty=ty.toString(), ty.length==19
5005{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5006}}}}}}{{{#!if ty=+ty
5007}}}}}}
5008{{{#!if ty>ab
5009{{{#!if tn-=1, ab+=+("1"+pd)
5010}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
5011}}}}}}
5012{{{#!if !br
r249
5013{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
5014{{{#!if ps=true, tw=0
r243
5015}}}}}}
5016{{{#!if !ps
5017{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
5018}}}{{{#!if ty=ty.toString(), ty.length==19
5019{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5020}}}}}}
5021{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
5022{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
5023}}}{{{#!if ty=ty.toString(), ty.length==19
5024{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5025}}}}}}{{{#!if ty=+ty
5026}}}}}}
r256
5027{{{#!if ty>ab
r243
5028{{{#!if au-=1, ab+=+("1"+pd)
5029}}}}}}{{{#!if au-=tx, ab-=ty
r256
5030}}}}}}
5031{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
5032}}}
5033{{{#!if (au==0)&&(ab==0)
5034{{{#!if br=true
5035}}}}}}}}}
5036{{{#!if !br
5037{{{#!if au=au.toString(), ab=ab.toString()
r252
5038}}}{{{#!if tn="", ps=(au.length==18), ps
5039{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
5040}}}}}}{{{#!if !ps&&(au.length<17)
5041{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
5042}}}}}}{{{#!if ab.length<18
5043{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
5044}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
5045}}}}}}
r243
5046##i=71
5047{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
5048{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
5049}}}{{{#!if ty=ty.toString(), ty.length==19
5050{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5051}}}}}}
5052{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
5053{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
5054}}}{{{#!if ty=ty.toString(), ty.length==19
5055{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5056}}}}}}{{{#!if ty=+ty
5057}}}}}}
5058{{{#!if ty>ab
5059{{{#!if tn-=1, ab+=+("1"+pd)
5060}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
5061}}}}}}
5062{{{#!if !br
r249
5063{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
5064{{{#!if ps=true, tw=0
r243
5065}}}}}}
5066{{{#!if !ps
5067{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
5068}}}{{{#!if ty=ty.toString(), ty.length==19
5069{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5070}}}}}}
5071{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
5072{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
5073}}}{{{#!if ty=ty.toString(), ty.length==19
5074{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5075}}}}}}{{{#!if ty=+ty
5076}}}}}}
r256
5077{{{#!if ty>ab
r243
5078{{{#!if au-=1, ab+=+("1"+pd)
5079}}}}}}{{{#!if au-=tx, ab-=ty
r256
5080}}}}}}
5081{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
5082}}}
5083{{{#!if (au==0)&&(ab==0)
5084{{{#!if br=true
r256
5085}}}}}}}}}
r285
5086tn을 빈 문자열로 초기화하고 변수 ts를 가져옵니다. 마지막 72회까지 몫을 구하는 계산을 했음에도 불구하고 나머지가 나누어떨어져 0이 되지 않는다면 tn을 "..."로, ts를 true로 바꿉니다.
5087{{{#!if tn="", !br
r245
5088{{{#!if tn="...", ts=true
r247
5089}}}}}}
r229
5090
r196
5091##rs 매기기
r248
5092앞에 매겼던 ac와 bc로 판별식을 만듭니다. i=ac-bc로 둡니다. a의 가장 큰 자리와 b의 가장 큰 자리가 얼마나 차이나는가에 따라 몫에 매기는 소수점 위치가 달라집니다. i>=-35 (ac==-18이고 bc==17일 경우), i<=35 (ac==17이고 bc=-18일 경우)입니다.
r264
5093{{{#!if i=ac-bc
5094}}}
r272
5095a에서 b를 나누면 몫을 10^i 의 자리부터 매기게 됩니다. 소수점 아랫부분까지 몫 기록이 이어지면 상관이 없겠으나, 몫이 소수가 아닌 정수로 기록될 때 실제 자릿수에 해당하는 길이보다 (금방 나누어떨어져) 몫이 짧게 기록되고 그치는 경우 남는 자리에 자동적으로 0을 채워주지 않게 됩니다. 이러면 수동으로 0을 채워주어야 하며, (i==0일 경우 10^0의 자리부터 몫을 기록하므로 10^1과 같거나 큰 자리부터 기록할 경우 곧) i>0일 때에만 의미가 있습니다.
5096이를테면 4000/2를 계산하는 경우 몫이 "2"까지만 기록되며 뒤에 000은 수동으로 채워주어야 합니다.
5097{{{#!if i>0
5098몫은 tm으로 기록되므로 tm의 길이를 따집니다. i가 양수이고 몫이 정수로 나누어떨어질 경우, tm의 길이가 적어도 i+1이 되게 맞춥니다.
5099{{{#!if i+1>tm.length
5100i+1보타 tm의 길이가 작은 경우 i==35인 경우를 감안하여 tm의 뒷부분을 pd+pd --더블 패드--로 채운 다음 i+1길이만큼 오려냅니다.
5101{{{#!if tm+=pd+pd, tm=tm.substr(0,i+1)
5102}}}}}}}}}
5103
r248
5104i가 18 이상 (18 이상 35 이하)이면 rs를 매길 수 있습니다. 몫을 적어놓은 문자열 tm의 0번 index에 들어가는 문자부터 i에서 18을 뺀 값의 index에 들어가는 문자까지를 rs로 두며, rs의 문자열 길이는 i-18+1 곧 i-17입니다.
r264
5105{{{#!if i>=18
r248
5106tm에서 rs를 오려낸 문자열을 tm으로 다시 둡니다.
5107{{{#!if rs=tm.substr(0,i-17), tm=tm.substr(i-17)
5108}}}}}}
r264
5109
r196
5110##ru 매기기
r284
5111ps를 먼저 false로 초기화한 다음, i>=18 이 되(어 rs를 매기)는 경우 ps를 true로 맞춥니다.
5112{{{#!if ps=false, i>=18
r264
5113{{{#!if ps=true
r248
5114}}}}}}
r264
5115ps가 true이면 문자열 tm에서 18번째 자리까지를 ru로 두고, tm에서 ru를 오려낸 문자열을 tm으로 둡니다.
5116{{{#!if ps
5117{{{#!if ru=tm.substr(0,18), tm=tm.substr(18)
5118}}}}}}
5119ps가 false이고 (i가 충분히 큰 값이 아니고) i가 0 이상 (0 이상 17 이하)인 수라면 ru를 매길 수 있으며 문자열의 길이는 i+1이 됩니다.
5120{{{#!if !ps&&(i>=0)
r261
5121{{{#!if ru=tm.substr(0,i+1), tm=tm.substr(i+1)
r248
5122}}}}}}
r196
5123
5124##rb 매기기
r264
5125i>=0이 되(어 ru를 매기)는 경우 ps를 true로 맞춥니다.
r248
5126{{{#!if i>=0
r264
5127{{{#!if ps=true
r260
5128}}}}}}
r264
5129ps가 true이면 문자열 tm에서 18번째 자리까지를 rb로 두고, tm에서 rb를 오려낸 문자열을 tm으로 둡니다.
5130{{{#!if ps
5131{{{#!if rb=tm.substr(0,18), tm=tm.substr(18)
r248
5132}}}}}}
r264
5133ps가 false이고 i가 -18 이상 (-18 이상 -1 이하)이면 rb를 매길 수 있습니다.
r266
5134이 때 몫으로 문자열의 길이는 i+18+1 곧 i+19가 되며 그 앞부분은 0으로 채워집니다.
5135몫으로 i+19개의 자리가 채워진다면, 몫 앞을 0으로 채우는 수량은 18에서 i+19를 뺀 -i-1이 됩니다.
5136이것을 substr을 이용하여 (18자리 문자열인) pd의 substr로 채워보자면
513718에서 (-i-1)을 뺀 i+19 번부터 끝까지 해당하는 문자열로 채우면 됩니다.
r292
5138{{{#!if !ps
5139{{{#!if i>=-18
r266
5140{{{#!if rb=tm.substr(0,i+19), tm=tm.substr(i+19), rb=pd.substr(i+19)+rb
r264
5141}}}}}}
r292
5142만일 i<0이고 i가 -18보다 작아 rb에 몫을 기록하지 않고 rb보다 더 아래 자리에 기록하게 된다면 rb의 18자리를 모두 0으로 채웁니다.
5143{{{#!if i<-18
5144{{{#!if rb=pd
5145}}}}}}
5146}}}
r196
5147
5148##ri 매기기
r264
5149i>=-18이 되(어 rb를 매기)는 경우 ps를 true로 맞춥니다.
r248
5150{{{#!if i>=-18
r264
5151{{{#!if ps=true
r260
5152}}}}}}
r264
5153ps가 true이면 rb와 같은 방법으로 ri를 매기고, tm을 다시 정의합니다.
5154{{{#!if ps
5155{{{#!if ri=tm.substr(0,18), tm=tm.substr(18)
r248
5156}}}}}}
r264
5157ps가 false이며 i가 -19 이하 (-36이상 -19 이하이나, i의 최소값은 -35)이면 ri를 매길 수 있습니다. rb와 같습니다.
5158{{{#!if !ps&&(i>=-36)
r266
5159{{{#!if ri=tm.substr(0,i+37), tm=tm.substr(i+37), ri=pd.substr(i+37)+ri
r264
5160}}}
5161}}}
5162
r281
5163ri까지 몫을 기록했음에도 불구하고 여전히 몫이 남는다면 ... 처리를 하고 ts를 true로 바꿉니다.
r273
5164{{{#!if tm.length>0
r281
5165{{{#!if tn="...", ts=true
r273
5166}}}}}}
5167
r231
5168여기까지가 나눗셈의 계산과정입니다.
r194
5169}}}
5170
r261
5171##== 계산 결과 표시 정리하기 ==
r302
5172##=== 결과값 표시 정리하기 ===
r231
5173연산이 끝났으면 표기된 숫자를 정리합니다.
5174
r285
5175##rs, ru 정리 부분
r304
5176먼저 ru를 (곱셈연산에서 정수값으로 나올 수 있고, 나눗셈에서 몫이 1보다 작은 값이 나오는 경우같이 값을 부여하지 않았다면 초기화할 때 정의했던 정수 0인 채로 있으므로) 문자열로 바꿉니다.
r164
5177{{{#!if ru=ru.toString()
r262
5178}}}
517918자리씩 끊어 표기하므로 소수점 위 19~36번째 자리에 해당하는 rs값이 (가령 곱셈에서, 곱한 값을 더한 결과가) 0일 경우 rs를 빈 문자열로 바꿉니다. 이 때 ru를 정수로 바꿔 ru 왼쪽에 있는 0들을 지운 다음, ru를 문자열로 바꿉니다.
5180{{{#!if +rs==0
5181{{{#!if rs="", ru=+ru, ru=ru.toString()
5182}}}}}}
5183
5184계산과정에서 ru의 윗자리인 rs값이 0보다 클 경우, 1~18번째 자리인 ru에 빈 자리를 채우도록 ru의 왼쪽을 0으로 채웁니다.
5185{{{#!if +rs>0
r228
5186{{{#!if rs=rs.toString(), ru=pd+ru, ru=ru.substr(ru.length-18, 18)
r262
5187}}}
5188rs를 정수로 바꿔 rs 앞에 있는 0들을 지운 다음 rs를 문자열로 바꿉니다.
5189{{{#!if rs=+rs, rs=rs.toString()
r171
5190}}}}}}
r156
5191
r285
5192##rb, ri 정리 부분
r287
5193i보다 소수점 아래부분을 더 써내려가야 하는 상황이 아닌(나눗셈에서 ts가 false인) 경우에서, 소수점 아래 19~36번째 자리에 해당하는 ri값이 0일 경우 ri를 빈 문자열로 바꿉니다.
r179
5194이 때 ri와 rb가 모두 0일 경우 rb도 빈 문자열로 바꾸고 rp=0으로 둡니다.
r285
5195{{{#!if !ts
r273
5196{{{#!if +ri==0
r164
5197{{{#!if ri=""
r273
5198}}}{{{#!if +rb==0
r179
5199{{{#!if rb="", rp=0
r285
5200}}}}}}}}}}}}
r179
5201
r285
5202ri가 빈 문자열이 아닐 (+ri가 0보다 클) 때 true를 주는 논리값으로 ps를 정의합니다.
5203{{{#!if ps=(+ri>0)
5204}}}
r164
5205
r287
5206{{{#!if f=="*"
r288
5207곱셈연산에서 ri가 비어있지 않을 경우 ri와 rb를 문자열로 바꾼 다음 각각 왼쪽을 0으로 채웁니다.
5208{{{#!if ps
5209{{{#!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)
5210}}}}}}
r289
5211곱셈연산에서 ri가 비어있으나 rb가 비어있지 않을 경우 rb를 문자열로 바꾼 다음 rb의 왼쪽을 0으로 채웁니다.
5212{{{#!if !ps&&(+rb>0)
r228
5213{{{#!if rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
r179
5214}}}}}}
r287
5215}}}
r179
5216
r285
5217!ts인 상황에서 ps가 true이면 rp를 ri의 길이로, 그렇지 않고 rb만 0이 아닌경우 rp를 rb의 길이로 정의합니다.
5218{{{#!if !ts
r187
5219{{{#!if ps
r189
5220{{{#!if this.rp=ri.length
r277
5221}}}
r290
5222ps가 true일 때 19~36번째 자리인 ri까지 계산하므로 rp에 18을 더해야 하지만, 문자열 정리를 하기 위해 문자열의 index 번호를 다루고자 18을 더하는 작업은 뒤로 뻅니다.
5223}}}
r277
5224
5225{{{#!if !ps&&(rb!="")
r189
5226{{{#!if this.rp=rb.length
r160
5227}}}}}}
5228
r285
5229!ts이면서 ri가 빈 문자열이 아닐 경우 ri의 오른쪽부터 붙은 "0"들을 모두 지웁니다.
r167
5230{{{#!if ps
r223
5231{{{#!if (rp>9)&&(ri.substr(rp-9,9)=="000000000")
r290
5232{{{#!if this.ri=ri.substr(0,rp-9), rp-=9
r167
5233}}}}}}
r223
5234{{{#!if (rp>4)&&(ri.substr(rp-4,4)=="0000")
r290
5235{{{#!if this.ri=ri.substr(0,rp-4), rp-=4
r167
5236}}}}}}
r223
5237{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r290
5238{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r167
5239}}}}}}
r223
5240{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r290
5241{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r167
5242}}}}}}
r223
5243{{{#!if (rp>1)&&(ri.substr(rp-1,1)=="0")
r290
5244{{{#!if this.ri=ri.substr(0,rp-1), rp-=1
5245}}}}}}
5246문자열 정리를 끝냈을 때 rp에 18을 더합니다.
5247{{{#!if rp+=18
5248}}}}}}
r62
5249
r285
5250!ts이면서 이면서 ri가 빈 문자열일 경우, rb의 오른쪽에 붙은 "0"들을 모두 지웁니다,
r168
5251{{{#!if !ps
r223
5252{{{#!if (rp>9)&&(rb.substr(rp-9,9)=="000000000")
r290
5253{{{#!if this.rb=rb.substr(0,rp-9), rp-=9
r164
5254}}}}}}
r223
5255{{{#!if (rp>4)&&(rb.substr(rp-4,4)=="0000")
r290
5256{{{#!if this.rb=rb.substr(0,rp-4), rp-=4
r164
5257}}}}}}
r223
5258{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r290
5259{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r164
5260}}}}}}
r223
5261{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r290
5262{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r164
5263}}}}}}
r223
5264{{{#!if (rp>1)&&(rb.substr(rp-1,1)=="0")
r290
5265{{{#!if this.rb=rb.substr(0,rp-1), rp-=1
r167
5266}}}}}}}}}
r285
5267}}}
r188
5268
r285
5269ts인 경우 rb, ri의 오른쪽 부분을 정리하지 않고 rp를 39로 정의합니다.
5270{{{#!if ts
5271{{{#!if rp=39
5272}}}}}}
5273
5274
5275
r164
5276rb 정리를 이것으로 종료합니다.
5277
r216
5278##== 오류 코드 ==
5279error
52801 : 오버플로
r337
52812 : 언더플로 (사용하지 않음)
52823 : 0으로 나눌 수 없음
52834 : 0으로 연산할 수 없음 (사용하지 않음)
r216
52845 : 이중 소수점 표기
52856 : 소수점 윗부분 오류
52867 : 소수점 아랫부분 오류
5287
5288warning
52891 : 소수점 아래 입력한 자릿수가 너무 많음.
5290
5291##== 아래 출력 변수 설명 ==
r336
5292'''sa''' : searching a (logical); '''sb''' : searching b (logical); '''sf''' : searching f (logical);
5293'''ps''' : pass (logical);
r308
5294'''ad''' : "a" decimal point of string variable 'ma' (integer);
5295'''bd''' : "b" decimal point of string variable 'mb' (integer);
5296'''md''' : displaying mode number (string→integer); '''ms''' : message for correction (string)
r310
5297'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r306
5298'''tx''' : temporary value 1 (integer); '''ty''' : temporary value 2 (integer); '''tz''' : temporary value 3 (integer);
r336
5299'''comment''' : comment (string);
r85
5300ru는 계산결과에서 소수점 위 자리이므로, dot(.)이 나오지 않습니다.
r338
5301##== 출력 부분 ==
5302##=== 계산값 출력 (정상 출력) ===
r276
5303}}}{{{#!wiki style="font-weight: 300; font-size: 17.5px;"
r310
5304{{{#!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
5305}}}{{{#!if !(sa&sb&sf)
5306{{{#!if !sa||!sb
5307변수 {{{#!if !sa
r321
5308a{{{#!if !sb
5309와 변수 }}}}}}{{{#!if !sb
r322
5310b}}}}}}{{{#!if !sf
r321
5311{{{#!if !sa&!sb
r323
5312, 그리고 }}}{{{#!if !sa^!sb
r321
5313와 }}}연산자 f}}}를 입력하세요...}}}{{{#!if sa&&sb&&sf
r112
5314{{{#!if (ea==0)&&(eb==0)
r77
5315{{{#!if as[0]!=45
r48
5316@a@}}}{{{#!if as[0]==45
r110
5317(@a@)}}} {{{#!if as.length>=20
r307
5318[br]}}}@f@ {{{#!if bs[0]!=45
r48
5319@b@}}}{{{#!if bs[0]==45
r310
5320(@b@)}}} {{{#!if (ma!=as)||(mb!=bs)||(+md==3)||(+md==4)
r307
5321{{{#!if (as.length+bs.length>=30)
r308
5322[br]}}}→ {{{#!if ms=ma, ad!=-1
5323{{{#!if ms=ma.substr(0,ad)
r312
5324}}}}}}{{{#!if ps=false, ms[0]==45
r309
5325{{{#!if ms=ms.substr(1), ps=true
r311
5326}}}}}}{{{#!if (+md==3)||(+md==4)
5327{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r318
5328{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r310
5329}}}}}}{{{#!if (ty>0)&&(tz>0)
5330{{{#!if tm+=","
5331}}}}}}{{{#!if ty-->0
r316
5332{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r310
5333}}}}}}{{{#!if ty-->0
r316
5334{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5335}}}}}}{{{#!if ty-->0
r316
5336{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5337}}}}}}{{{#!if ty-->0
r316
5338{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5339}}}}}}{{{#!if ty-->0
r316
5340{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5341}}}}}}{{{#!if ty-->0
r316
5342{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r311
5343}}}}}}{{{#!if ms=tm
r314
5344}}}}}}{{{#!if ps
5345(-}}}@ms@{{{#!if ad!=-1
5346{{{#!if ms=ma.substr(ad+1)
5347}}}{{{#!if (+md==3)||(+md==4)
r316
5348{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
5349{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5350}}}}}}{{{#!if ty-->0
r316
5351{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5352}}}}}}{{{#!if ty-->0
r316
5353{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5354}}}}}}{{{#!if ty-->0
r316
5355{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5356}}}}}}{{{#!if ty-->0
r316
5357{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5358}}}}}}{{{#!if ms=tm
r315
5359}}}}}}.@ms@}}}{{{#!if ps
r317
5360)}}} @f@ {{{#!if tm="", tn="", ms=mb, bd!=-1
r308
5361{{{#!if ms=mb.substr(0,bd)
r312
5362}}}}}}{{{#!if ps=false, ms[0]==45
r310
5363{{{#!if ms=ms.substr(1), ps=true
r311
5364}}}}}}{{{#!if (+md==3)||(+md==4)
5365{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r318
5366{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r310
5367}}}}}}{{{#!if (ty>0)&&(tz>0)
5368{{{#!if tm+=","
5369}}}}}}{{{#!if ty-->0
r316
5370{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r310
5371}}}}}}{{{#!if ty-->0
r316
5372{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5373}}}}}}{{{#!if ty-->0
r316
5374{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5375}}}}}}{{{#!if ty-->0
r316
5376{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5377}}}}}}{{{#!if ty-->0
r316
5378{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5379}}}}}}{{{#!if ty-->0
r316
5380{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r311
5381}}}}}}{{{#!if ms=tm
r314
5382}}}}}}{{{#!if ps
5383(-}}}@ms@{{{#!if bd!=-1
5384{{{#!if ms=mb.substr(bd+1)
5385}}}{{{#!if (+md==3)||(+md==4)
r316
5386{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
5387{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5388}}}}}}{{{#!if ty-->0
r316
5389{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5390}}}}}}{{{#!if ty-->0
r316
5391{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5392}}}}}}{{{#!if ty-->0
r316
5393{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5394}}}}}}{{{#!if ty-->0
r316
5395{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5396}}}}}}{{{#!if ms=tm
r315
5397}}}}}}.@ms@}}}{{{#!if ps
r314
5398)}}} }}}{{{#!if (bs.length>=20)||(as.length+bs.length>=30)
r329
5399[br]}}}= @ns@{{{#!if comment="rs 표시 부분", ms=rs, tx=6%(+md), tm="", tn="", (+md==3)||(+md==4)
r331
5400{{{#!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
5401{{{#!if tm+=tn.substr(0,tz), tn=tn.substr(tz), ty>0
5402{{{#!if tm+=","
r331
5403}}}}}}}}}{{{#!if ty-->0
5404{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
5405}}}}}}{{{#!if ty-->0
5406{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5407}}}}}}{{{#!if ty-->0
5408{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5409}}}}}}{{{#!if ty-->0
5410{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5411}}}}}}{{{#!if ty-->0
5412{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5413}}}}}}{{{#!if ty-->0
5414{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r332
5415}}}}}}{{{#!if ms=tm
r334
5416}}}}}}@ms@{{{#!if comment="rs의 값이 존재하고 끊는 단위로 떨어질 때 자릿수 구분 기호인 반점을 새깁니다.", ms=((rs!="")&&(18%(+md)==0))?",":""
r333
5417}}}@ms@{{{#!if comment="ru 표시 부분", ms=ru, tm="", tn="", (+md==3)||(+md==4)
5418{{{#!if tn=ms, ty=ms.length, tz=ty%(+md), ty=ty/(+md), tz>0
5419{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
5420}}}}}}{{{#!if (ty>0)&&(tz>0)
5421{{{#!if tm+=","
5422}}}}}}{{{#!if ty-->0
5423{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
5424}}}}}}{{{#!if ty-->0
5425{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5426}}}}}}{{{#!if ty-->0
5427{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5428}}}}}}{{{#!if ty-->0
5429{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5430}}}}}}{{{#!if ty-->0
5431{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5432}}}}}}{{{#!if ty-->0
5433{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5434}}}}}}{{{#!if ms=tm
5435}}}}}}@ms@{{{#!if +rp>0
r98
5436##rb string, decimal point marking
r333
5437.{{{#!if comment="rb 표시 부분", ms=rb, tm="", tn="", (+md==3)||(+md==4)
5438{{{#!if tn=ms, ty=ms.length, ty=ty/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
5439{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5440}}}}}}{{{#!if ty-->0
5441{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5442}}}}}}{{{#!if ty-->0
5443{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5444}}}}}}{{{#!if ty-->0
5445{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5446}}}}}}{{{#!if ty-->0
5447{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5448}}}}}}{{{#!if ms=tm
5449}}}}}}@ms@{{{#!if ri!=""
r334
5450{{{#!if comment="ri의 값이 존재하고 끊는 단위로 떨어질 때 자릿수를 매기고자 띄어쓰기를 넣습니다.", ms=(18%(+md)==0)?" ":""
r333
5451}}}@ms@{{{#!if comment="ri 표시 부분", ms=ri, tm="", tn="", (+md==3)||(+md==4)
r335
5452{{{#!if comment="rs의 경우와 같이, md만큼 떼었을 때 rb에서 모자라는 자릿수를 먼저 끊어 표시합니다.", tn=ms, ty=ms.length, ty=(ty+tx)/(+md), tm=tn.substr(0,tx), tn=tn.substr(tx), ty>0
5453{{{#!if tm+=" "
5454}}}}}}{{{#!if ty-->0
5455{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
5456}}}}}}{{{#!if ty-->0
r333
5457{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5458}}}}}}{{{#!if ty-->0
5459{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5460}}}}}}{{{#!if ty-->0
5461{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5462}}}}}}{{{#!if ty-->0
5463{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5464}}}}}}{{{#!if ty-->0
5465{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5466}}}}}}{{{#!if ms=tm
r339
5467}}}}}}@ms@{{{#!if (f=='/')&&ts
r340
5468...}}}}}}}}}}}}}}}{{{#!if (ea>0)||(eb>0)
r338
5469##=== 오류 · 경고 코드 출력 부분 ===
r112
5470{{{#!if (ea==1)||(eb==1)
r192
5471'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==1
r112
5472a{{{#!if eb==1
5473와 }}}}}}{{{#!if eb==1
r298
5474b}}}에 범위를 초과하는 값이 입력되었습니다. {{{#gray (오버플로)}}}{{{#!if ea!=eb
5475[br]}}}}}}{{{#!if eb==3
5476'''{{{#orangered [오류]}}}''' 0으로 나눌 수 없습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
5477[br]}}}}}}{{{#!if (ea==5)||(eb==5)
r216
5478'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==5
5479a{{{#!if eb==5
5480와 }}}}}}{{{#!if eb==5
r298
5481b}}}에 소수점이 2개 이상 입력되었습니다. {{{#gray (입력 오류)}}}}}}{{{#!if (ea==6)||(eb==6)
r216
5482'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==6
5483a의 소수점 윗자리{{{#!if eb==6
5484와 }}}}}}{{{#!if eb==6
r280
5485b의 소수점 윗자리}}}에 올바르지 않은 문구{{{#!if ps=(((ea==6)&&(eb==7))||((ea==7)&&(eb==6))), ps
r279
5486가, }}}{{{#!if !ps
r298
5487가 입력되었습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
5488[br]}}}}}}}}}{{{#!if (ea==7)||(eb==7)
r279
5489{{{#!if !ps
5490'''{{{#orangered [오류]}}}'''}}} 변수 {{{#!if ea==7
r216
5491a의 소수점 아랫자리{{{#!if eb==7
5492와 }}}}}}{{{#!if eb==7
r299
5493b의 소수점 아랫자리}}}에 올바르지 않은 문구가 입력되었습니다. {{{#gray (입력 오류)}}}}}}}}}{{{#!if ((wa>0)||(wb>0))&&(((ea==0)&&(eb==0))||((wb==1)&&(eb==3)))
r300
5494{{{#!if (eb!=3)||((ea>3)&&(eb==3))
r298
5495[br]}}}{{{#!wiki style="display: inline; text-shadow: 1px 1px 2px gray;"
r301
5496'''{{{#yellow [경고] }}}'''}}}변수 {{{#!if (wa==1)&&(ea==0)
5497a{{{#!if (wb==1)&&(ea==0)
r269
5498와 }}}}}}{{{#!if wb==1
5499b}}}의 소수점 아래에 입력한 문구가 너무 많습니다. 소수점 아래 19번째 자리부터 입력된 문구는 무시됩니다.
5500}}}}}}