exponential-number 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,7 +84,6 @@ class ExponentNumber {
|
|
|
84
84
|
}
|
|
85
85
|
return this;
|
|
86
86
|
}
|
|
87
|
-
console.log(this, otherNumber);
|
|
88
87
|
if (this.value === otherNumber.value) {
|
|
89
88
|
this.resetValue();
|
|
90
89
|
return this;
|
|
@@ -118,7 +117,6 @@ class ExponentNumber {
|
|
|
118
117
|
}
|
|
119
118
|
const result = new ExponentNumber(this.exponentFactor, Math.log10(this.value));
|
|
120
119
|
result.minus(new ExponentNumber(otherNumber.exponentFactor, Math.log10(otherNumber.value)));
|
|
121
|
-
console.log(result);
|
|
122
120
|
this.exponentFactor = result.exponentFactor + 1;
|
|
123
121
|
this.value = result.value;
|
|
124
122
|
this.normalize();
|
|
@@ -141,7 +139,6 @@ class ExponentNumber {
|
|
|
141
139
|
return this;
|
|
142
140
|
}
|
|
143
141
|
result.divide(otherNumber);
|
|
144
|
-
console.log(result);
|
|
145
142
|
this.exponentFactor = result.exponentFactor + 1;
|
|
146
143
|
this.value = result.value;
|
|
147
144
|
this.normalize();
|
|
@@ -151,8 +148,8 @@ class ExponentNumber {
|
|
|
151
148
|
return this.root(new ExponentNumber(0, 2));
|
|
152
149
|
}
|
|
153
150
|
log(base) {
|
|
154
|
-
const result = new ExponentNumber(this.exponentFactor, Math.log10(this.value));
|
|
155
|
-
result.divide(new ExponentNumber(base.exponentFactor, Math.log10(base.value)));
|
|
151
|
+
const result = new ExponentNumber(this.exponentFactor, Math.log10(this.value + 1));
|
|
152
|
+
result.divide(new ExponentNumber(base.exponentFactor, Math.log10(base.value + 1)));
|
|
156
153
|
this.applyNewValues(result);
|
|
157
154
|
this.normalize();
|
|
158
155
|
return this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exponential-number",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Small package with class to work with big numbers. This class allows to work with 1e...(1.8e308)...e1e100",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsc",
|
|
17
|
-
"test": "jest --config=jest.config.js test.ts"
|
|
17
|
+
"test": "jest --config=jest.config.js test.ts",
|
|
18
|
+
"update": "npm run build && npm publish"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
20
21
|
"typescript",
|