| 82 | * |
| 83 | */ |
| 84 | function _Big_() { |
| 85 | |
| 86 | /* |
| 87 | * The Big constructor and exported function. |
| 88 | * Create and return a new instance of a Big number object. |
| 89 | * |
| 90 | * n {number|string|Big} A numeric value. |
| 91 | */ |
| 92 | function Big(n) { |
| 93 | var x = this; |
| 94 | |
| 95 | // Enable constructor usage without new. |
| 96 | if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n); |
| 97 | |
| 98 | // Duplicate. |
| 99 | if (n instanceof Big) { |
| 100 | x.s = n.s; |
| 101 | x.e = n.e; |
| 102 | x.c = n.c.slice(); |
| 103 | } else { |
| 104 | parse(x, n); |
| 105 | } |
| 106 | |
| 107 | /* |
| 108 | * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which |
| 109 | * points to Object. |
| 110 | */ |
| 111 | x.constructor = Big; |
| 112 | } |
| 113 | |
| 114 | Big.prototype = P; |
| 115 | Big.DP = DP; |
| 116 | Big.RM = RM; |
| 117 | Big.NE = NE; |
| 118 | Big.PE = PE; |
| 119 | Big.version = '5.0.2'; |
| 120 | |
| 121 | return Big; |
| 122 | } |
| 123 | |
| 124 | |
| 125 | /* |