metanum 1.3.0 → 2.0.0
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.
- package/README.md +998 -674
- package/format-metanum.js +1868 -971
- package/metanum.js +6317 -5051
- package/package.json +32 -23
- package/test-interface.html +6 -6
- package/test_mixed.js +1433 -759
- package/.gitattributes +0 -1
package/package.json
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "metanum",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A javascript library that handles numbers as large as f_ε₀(9e15)",
|
|
5
|
-
"main": "metanum.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "metanum",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A javascript library that handles numbers as large as f_ε₀(9e15)",
|
|
5
|
+
"main": "metanum.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"metanum.js",
|
|
8
|
+
"format-metanum.js",
|
|
9
|
+
"test-interface.html",
|
|
10
|
+
"test_mixed.js",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "node test.js",
|
|
16
|
+
"example": "node basic-usage.js"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"large-numbers",
|
|
20
|
+
"hardy-hierarchy",
|
|
21
|
+
"ordinal-arithmetic",
|
|
22
|
+
"hyper-operations",
|
|
23
|
+
"mathematics"
|
|
24
|
+
],
|
|
25
|
+
"author": "dlsdl",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/dlsdl/metanum/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/dlsdl/metanum"
|
|
31
|
+
}
|
|
32
|
+
|
package/test-interface.html
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
<h2>test in console</h2>
|
|
36
36
|
|
|
37
|
-
<button id="runTestBtn"
|
|
37
|
+
<button id="runTestBtn">run test_mixed.js</button>
|
|
38
38
|
<div id="consoleOutput" style="margin-top: 20px; padding: 10px; background-color: #f0f0f0; border-radius: 4px; min-height: 100px; font-family: monospace; font-size: 14px; white-space: pre-wrap;"></div>
|
|
39
39
|
|
|
40
40
|
<script>
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
const outputDiv = document.getElementById('consoleOutput');
|
|
43
43
|
outputDiv.innerHTML = '';
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// save original console.log
|
|
46
46
|
const originalLog = console.log;
|
|
47
47
|
|
|
48
|
-
//
|
|
48
|
+
// rewrite console.log to output to the div
|
|
49
49
|
console.log = function(...args) {
|
|
50
50
|
originalLog.apply(console, args);
|
|
51
51
|
const logEntry = document.createElement('div');
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
outputDiv.appendChild(logEntry);
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
//
|
|
61
|
+
// load test_mixed.js
|
|
62
62
|
const script = document.createElement('script');
|
|
63
63
|
script.src = './test_mixed.js';
|
|
64
64
|
script.onload = function() {
|
|
65
|
-
console.log('test_mixed.js
|
|
65
|
+
console.log('test_mixed.js loaded');
|
|
66
66
|
};
|
|
67
67
|
script.onerror = function() {
|
|
68
|
-
console.log('
|
|
68
|
+
console.log('Failed to load test_mixed.js');
|
|
69
69
|
console.log = originalLog;
|
|
70
70
|
};
|
|
71
71
|
document.head.appendChild(script);
|