| r118 vs r119 | ||
|---|---|---|
| ... | ... | |
| 16 | 16 | '''ru''' : "result" upper value (integer→string); '''rb''' : "result" below value (integer→string); |
| 17 | 17 | '''rp''' : "result" # of places of decimal (integer); |
| 18 | 18 | '''i''' : index; '''tv''' temporary value; '''ps''' : pass (logical); |
| 19 | {{{#!if this.as=a.toString(), this.bs=b.toString(), this.ru=0+0, this.rb=0+0, this.rp=0+0, this.i=0+0, this.tv=1 | |
| 19 | '''ea''' : error about "a"; '''eb''' : error about "b"; '''wa''' : warning about "a" ; '''wb''' : warning about "b" ; | |
| 20 | {{{#!if this.as=a.toString(), this.bs=b.toString(), this.ru=0+0, this.rb=0+0, this.rp=0+0, this.i=0+0, this.tv=1, this.ea=0+0, this.eb=0+0, this.wa=0+0, this.wb=0+0 | |
| 20 | 21 | }}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".") |
| 21 | 22 | }}}{{{#!if ad!=-1 |
| 22 | 23 | 소수점이 발견되는 자리 번호가 ad이므로 ad+1번에 해당되는 자리부터 끝까지 표기. |
| ... | ... | |
| 36 | 37 | |
| 37 | 38 | ##유효성 검사. |
| 38 | 39 | the seed에서 지원되는 long(integer)가 unsigned였으면 1844경까지 가서 충분히 19자리로 놀 수 있었는데, signed long이므로 922경까지 가능한 공간에서 18자리로 잘라내기. 소수점 위 최대 18자리, 소수점 아래 최대 18자리 |
| 39 | {{{#!if au.length>19 | |
| 40 | {{{#!if ((au[0]!=45)&&(au.length>19))||((au[0]==45)&&(au.length>20)) | |
| 40 | 41 | error code of a 01번 : 오버플로 |
| 41 | 42 | {{{#!if ea=1 |
| 42 | 43 | }}}}}} |
| ... | ... | |
| 45 | 46 | {{{#!if wa=1, ab=ab.substr(0,18) |
| 46 | 47 | }}}}}} |
| 47 | 48 | |
| 48 | {{{#!if bu.length>19 | |
| 49 | {{{#!if ((bu[0]!=45)&&(bu.length>19))||((bu[0]==45)&&(bu.length>20)) | |
| 49 | 50 | error code of b 01번 : 오버플로 |
| 50 | 51 | {{{#!if eb=01 |
| 51 | 52 | }}}}}} |
| ... | ... | |
| 518 | 519 | b{{{#!if !sf |
| 519 | 520 | , }}}}}}{{{#!if !sf |
| 520 | 521 | f}}}를 입력하세요...)}}}{{{#!if sa&&sb&&sf |
| 522 | {{{#!if (ea==0)&&(eb==0) | |
| 521 | 523 | {{{#!if as[0]!=45 |
| 522 | 524 | @a@}}}{{{#!if as[0]==45 |
| 523 | 525 | (@a@)}}} {{{#!if as.length>=20 |
| ... | ... | |
| 1081 | 1083 | 7}}}{{{#!if p==56 |
| 1082 | 1084 | 8}}}{{{#!if p==57 |
| 1083 | 1085 | 9}}}{{{#!if i+=1 |
| 1086 | }}}}}}}}}}}}}}}}}}{{{#!if (ea>0)||(eb>0) | |
| 1087 | {{{#!if (ea==1)||(eb==1) | |
| 1088 | {{{#orange 오류 : }}}변수 {{{#!if ea==1 | |
| 1089 | a{{{#!if eb==1 | |
| 1090 | 와 }}}}}}{{{#!if eb==1 | |
| 1091 | b}}}에 너무 많은 값을 입력했습니다.}}} | |
| 1084 | 1092 | }}}}}} |
| 1085 | }}} | |
| 1086 | }}}}}}}}} | |
| 1087 | 1093 | ==# 2-1 #== |
| 1088 | 1094 | {{{#!wiki style="font-weight: 300; font-size: 20px" |
| 1089 | 1095 | {{{#!if +a>=0 |
| ... | ... |