Changeset 39081
- Timestamp:
- 12/14/11 02:32:22 (18 months ago)
- Location:
- lang/javascript/math-bigint/trunk
- Files:
-
- 2 modified
-
bigint.html (modified) (1 diff)
-
bigint.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/math-bigint/trunk/bigint.html
r38460 r39081 24 24 p (fact(101).div(fact(100))); 25 25 26 p (bigint(0).div(2)); 27 26 28 </textarea><br><input type="submit" value="run" onclick="rundom(this)" 27 29 ><input type="submit" value="clear" onclick="clsdom(this)" -
lang/javascript/math-bigint/trunk/bigint.js
r38461 r39081 1 1 /* 2 * $Id: bigint.js,v 0. 1 2010/09/11 17:07:30dankogai Exp dankogai $2 * $Id: bigint.js,v 0.2 2011/12/13 17:29:51 dankogai Exp dankogai $ 3 3 */ 4 4 … … 263 263 return bigint_from_string(x1); 264 264 } 265 return BigInt(1, 1);265 return new BigInt(1, 1); 266 266 } 267 267 function bigint_neg(x) { … … 373 373 if (nx < ny || nx === ny && x.digits[nx - 1] < y.digits[ny - 1]) { 374 374 if (modulo) return bigint_norm(x); 375 return BigInt(1, 1);375 return new BigInt(1, 1); 376 376 } 377 377 xds = x.digits; … … 521 521 */ 522 522 523 BigInt.prototype = { 523 (function(proto){ 524 for (var name in proto) BigInt.prototype[name] = proto[name]; 525 })({ 524 526 toString: _BigInt_toString, 525 527 toStringBase: _BigInt_toStringBase, … … 532 534 cmp: function(y) { return bigint_cmp(this, y) }, 533 535 neg: function(y) { return bigint_neg(this) } 534 } ;536 }); 535 537 536 538 Math.BigInt = BigInt;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)