metanum 2.1.1 → 2.2.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 +1167 -1042
- package/format-metanum.js +2179 -2144
- package/metanum.js +8421 -7164
- package/package.json +30 -30
- package/test-interface.html +83 -83
- package/test_mixed.js +4804 -2755
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
"name": "metanum",
|
|
3
|
-
"version": "2.
|
|
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_mixed.js"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"large-numbers",
|
|
19
|
-
"hardy-hierarchy",
|
|
20
|
-
"ordinal-arithmetic",
|
|
21
|
-
"hyper-operations",
|
|
22
|
-
"mathematics"
|
|
23
|
-
],
|
|
24
|
-
"author": "dlsdl",
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/dlsdl/metanum/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://github.com/dlsdl/metanum"
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "metanum",
|
|
3
|
+
"version": "2.2.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_mixed.js"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"large-numbers",
|
|
19
|
+
"hardy-hierarchy",
|
|
20
|
+
"ordinal-arithmetic",
|
|
21
|
+
"hyper-operations",
|
|
22
|
+
"mathematics"
|
|
23
|
+
],
|
|
24
|
+
"author": "dlsdl",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/dlsdl/metanum/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/dlsdl/metanum"
|
|
30
|
+
}
|
package/test-interface.html
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Metanum Test Interface</title>
|
|
7
|
-
<style>
|
|
8
|
-
body {
|
|
9
|
-
font-family: Arial, sans-serif;
|
|
10
|
-
margin: 20px;
|
|
11
|
-
background-color: #f5f5f5;
|
|
12
|
-
}
|
|
13
|
-
.container {
|
|
14
|
-
max-width: 800px;
|
|
15
|
-
margin: 0 auto;
|
|
16
|
-
background-color: white;
|
|
17
|
-
padding: 20px;
|
|
18
|
-
border-radius: 8px;
|
|
19
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
20
|
-
}
|
|
21
|
-
h1 {
|
|
22
|
-
color: #333;
|
|
23
|
-
text-align: center;
|
|
24
|
-
}
|
|
25
|
-
h2 {
|
|
26
|
-
color: #333;
|
|
27
|
-
text-align: center;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
30
|
-
</head>
|
|
31
|
-
<body>
|
|
32
|
-
<div class="container">
|
|
33
|
-
<h1>MetaNum Test Interface</h1>
|
|
34
|
-
|
|
35
|
-
<h2>test in console</h2>
|
|
36
|
-
|
|
37
|
-
<button id="runTestBtn">run test_mixed.js</button>
|
|
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
|
-
|
|
40
|
-
<script>
|
|
41
|
-
document.getElementById('runTestBtn').addEventListener('click', function() {
|
|
42
|
-
const outputDiv = document.getElementById('consoleOutput');
|
|
43
|
-
outputDiv.innerHTML = '';
|
|
44
|
-
|
|
45
|
-
// save original console.log
|
|
46
|
-
const originalLog = console.log;
|
|
47
|
-
|
|
48
|
-
// rewrite console.log to output to the div
|
|
49
|
-
console.log = function(...args) {
|
|
50
|
-
originalLog.apply(console, args);
|
|
51
|
-
const logEntry = document.createElement('div');
|
|
52
|
-
logEntry.textContent = args.map(arg => {
|
|
53
|
-
if (typeof arg === 'object') {
|
|
54
|
-
return JSON.stringify(arg, null, 2);
|
|
55
|
-
}
|
|
56
|
-
return String(arg);
|
|
57
|
-
}).join(' ');
|
|
58
|
-
outputDiv.appendChild(logEntry);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
// load test_mixed.js
|
|
62
|
-
const script = document.createElement('script');
|
|
63
|
-
script.src = './test_mixed.js';
|
|
64
|
-
script.onload = function() {
|
|
65
|
-
console.log('test_mixed.js loaded');
|
|
66
|
-
};
|
|
67
|
-
script.onerror = function() {
|
|
68
|
-
console.log('Failed to load test_mixed.js');
|
|
69
|
-
console.log = originalLog;
|
|
70
|
-
};
|
|
71
|
-
document.head.appendChild(script);
|
|
72
|
-
});
|
|
73
|
-
</script>
|
|
74
|
-
</div>
|
|
75
|
-
<script src="./metanum.js"></script>
|
|
76
|
-
<script src="./format-metanum.js"></script>
|
|
77
|
-
<script>
|
|
78
|
-
// test in console
|
|
79
|
-
// MetaNum v2.1.
|
|
80
|
-
console.log('=== MetaNum Library by dlsdl ===');
|
|
81
|
-
|
|
82
|
-
</script>
|
|
83
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Metanum Test Interface</title>
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
font-family: Arial, sans-serif;
|
|
10
|
+
margin: 20px;
|
|
11
|
+
background-color: #f5f5f5;
|
|
12
|
+
}
|
|
13
|
+
.container {
|
|
14
|
+
max-width: 800px;
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
background-color: white;
|
|
17
|
+
padding: 20px;
|
|
18
|
+
border-radius: 8px;
|
|
19
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
20
|
+
}
|
|
21
|
+
h1 {
|
|
22
|
+
color: #333;
|
|
23
|
+
text-align: center;
|
|
24
|
+
}
|
|
25
|
+
h2 {
|
|
26
|
+
color: #333;
|
|
27
|
+
text-align: center;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
</head>
|
|
31
|
+
<body>
|
|
32
|
+
<div class="container">
|
|
33
|
+
<h1>MetaNum Test Interface</h1>
|
|
34
|
+
|
|
35
|
+
<h2>test in console</h2>
|
|
36
|
+
|
|
37
|
+
<button id="runTestBtn">run test_mixed.js</button>
|
|
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
|
+
|
|
40
|
+
<script>
|
|
41
|
+
document.getElementById('runTestBtn').addEventListener('click', function() {
|
|
42
|
+
const outputDiv = document.getElementById('consoleOutput');
|
|
43
|
+
outputDiv.innerHTML = '';
|
|
44
|
+
|
|
45
|
+
// save original console.log
|
|
46
|
+
const originalLog = console.log;
|
|
47
|
+
|
|
48
|
+
// rewrite console.log to output to the div
|
|
49
|
+
console.log = function(...args) {
|
|
50
|
+
originalLog.apply(console, args);
|
|
51
|
+
const logEntry = document.createElement('div');
|
|
52
|
+
logEntry.textContent = args.map(arg => {
|
|
53
|
+
if (typeof arg === 'object') {
|
|
54
|
+
return JSON.stringify(arg, null, 2);
|
|
55
|
+
}
|
|
56
|
+
return String(arg);
|
|
57
|
+
}).join(' ');
|
|
58
|
+
outputDiv.appendChild(logEntry);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// load test_mixed.js
|
|
62
|
+
const script = document.createElement('script');
|
|
63
|
+
script.src = './test_mixed.js';
|
|
64
|
+
script.onload = function() {
|
|
65
|
+
console.log('test_mixed.js loaded');
|
|
66
|
+
};
|
|
67
|
+
script.onerror = function() {
|
|
68
|
+
console.log('Failed to load test_mixed.js');
|
|
69
|
+
console.log = originalLog;
|
|
70
|
+
};
|
|
71
|
+
document.head.appendChild(script);
|
|
72
|
+
});
|
|
73
|
+
</script>
|
|
74
|
+
</div>
|
|
75
|
+
<script src="./metanum.js"></script>
|
|
76
|
+
<script src="./format-metanum.js"></script>
|
|
77
|
+
<script>
|
|
78
|
+
// test in console
|
|
79
|
+
// MetaNum v2.1.2
|
|
80
|
+
console.log('=== MetaNum Library by dlsdl ===');
|
|
81
|
+
|
|
82
|
+
</script>
|
|
83
|
+
</body>
|
|
84
84
|
</html>
|