metanum 1.2.0 → 1.3.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 +9 -6
- package/format-metanum.js +972 -0
- package/metanum.js +1197 -1841
- package/package.json +1 -1
- package/test-interface.html +38 -0
- package/test_mixed.js +525 -206
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/metanum)
|
|
4
4
|
|
|
5
|
-
- MetaNum v1.
|
|
5
|
+
- MetaNum v1.3 by dlsdl
|
|
6
6
|
|
|
7
7
|
A huge number library holding up to X↑↑X&9e15.
|
|
8
8
|
|
|
@@ -10,9 +10,11 @@ This reaches level f<sub>ε₀</sub>, which is the limit of well-defined express
|
|
|
10
10
|
|
|
11
11
|
MetaNum provides a robust implementation of hierarchical number representation based on the Hardy hierarchy (HH) and ordinal arithmetic. It can handle numbers far beyond standard JavaScript Number limits, using a sophisticated multi-dimensional array structure to represent ordinal numbers up to ε₀ (ω^ω^ω^……with ω floors). Internally, each MetaNum instance is represented as:
|
|
12
12
|
|
|
13
|
-
- **sign**: 1 (positive)
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
13
|
+
- **sign**: 1 (positive), -1 (negative), 2 (reciprocal positive), -2 (reciprocal negative)
|
|
14
|
+
- **array**: 2-dimensional array `[[r0, e, f, g, ...], [acount, a1, a2, ...], [bcount, b1, b2, ...], ...]` where the first row holds the base value and finite hyper-operation exponents(represents the value of ...g 10^^^'s f 10^^'s e 10^'s r0), and subsequent rows hold ordinal terms(bcount times hyperoperation with ordinal level ...ω^2*b3+ω^*b2+b1 and acount times hyperoperation with ordinal level ...ω^2*a3+ω^*a2+a1, etc.), ordinal terms are sorted by levels from small to big
|
|
15
|
+
- **layer**: Non-negative integer representing the ω exponent tower height of hyperoperation level(ω^ω^……(ω polynomial) with layer ω^'s)
|
|
16
|
+
|
|
17
|
+
A metanum number is nearly f_ω^ω^…(layer-1 ω^'s)…(…+ω^(…+ω^2*b3+ω^*b2+b1)*bcount+ω^(…+ω^2*a3+ω^*a2+a1)*acount)[…g 10^^^'s f 10^^'s e 10^'s r0](layer>=1) or f…[f^bcount_(…ω^2*b3+ω^*b2+b1)[f^acount_(…ω^2*a3+ω^*a2+a1)[…g 10^^^'s f 10^^'s e 10^'s r0]]…](layer=0) in Fast Growing Hierarchy
|
|
16
18
|
|
|
17
19
|
## Installation
|
|
18
20
|
|
|
@@ -29,7 +31,7 @@ const b = MetaNum.fromNumber(-3.14);
|
|
|
29
31
|
|
|
30
32
|
// From a string (supports scientific notation, hyper-operations, letter notation, brackets, etc.)
|
|
31
33
|
const c = new MetaNum("1.5e308");
|
|
32
|
-
const d = MetaNum.fromString("
|
|
34
|
+
const d = MetaNum.fromString("F5"); // tetration: 10^^5
|
|
33
35
|
const e = MetaNum.fromString("E100#2"); // Hyper-E: 10^10^100 (googolplex)
|
|
34
36
|
const f = MetaNum.fromString("GF^2 E^3 123"); // letter notation
|
|
35
37
|
const g = MetaNum.fromString("Aa100"); // letter notation
|
|
@@ -169,7 +171,7 @@ new MetaNum(10).layeradd(3); // add 3 layers of exponentiation
|
|
|
169
171
|
new MetaNum(10).layeradd10(3); // 10^^3 (explicit base 10)
|
|
170
172
|
```
|
|
171
173
|
|
|
172
|
-
##
|
|
174
|
+
## Hyper-Operations up to ε₀
|
|
173
175
|
|
|
174
176
|
These functions represent iterated diagonalizations at increasing ordinal levels from ω to ε₀:
|
|
175
177
|
|
|
@@ -661,6 +663,7 @@ Then we can define (the β-th symbol or symbol combination)Aa = f\_ω^ω^...^ω(
|
|
|
661
663
|
|
|
662
664
|
## Changelog
|
|
663
665
|
|
|
666
|
+
- 2026-7-31 v1.3 Add format-metanum.js, fix basic operations, hyper operations and BEAF bugs
|
|
664
667
|
- 2026-7-9 v1.2 Add more hyper operations up to ε₀, add BEAF operation and fix bugs
|
|
665
668
|
- 2026-6-3 v1.1 Add support for very small numbers ,add more hyper operations and fix bugs
|
|
666
669
|
- 2026-5-23 v1.0 Rewritten and add even more hyper operations
|