metanum 2.1.1 → 2.1.2
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 +1103 -1042
- package/format-metanum.js +2137 -2144
- package/metanum.js +7204 -7164
- package/package.json +30 -30
- package/test-interface.html +83 -83
- package/test_mixed.js +3107 -2755
package/README.md
CHANGED
|
@@ -1,1042 +1,1103 @@
|
|
|
1
|
-
# MetaNum
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/metanum)
|
|
4
|
-
|
|
5
|
-
- MetaNum v2.1.
|
|
6
|
-
|
|
7
|
-
A huge number library holding up to X↑↑X&9e15.
|
|
8
|
-
|
|
9
|
-
This reaches level f<sub>ε₀</sub>, which is the limit of well-defined expressions in BEAF, hence the name.
|
|
10
|
-
|
|
11
|
-
MetaNum provides a robust implementation of hierarchical number representation based on 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
|
-
|
|
13
|
-
- **sign**: 1 (positive), -1 (negative), 2 (reciprocal positive), -2 (reciprocal negative)
|
|
14
|
-
- **array**: 2-dimensional array `[[r0, r1, r2, ...,rn], [acount, a1, a2, ...,ax], [bcount, b1, b2, ...,by], ...,[mcount, m1, m2, ...,mz]]` where the first row holds the base value and finite hyper-operation exponents and subsequent rows hold ordinal terms, 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
|
-
Using extended arrow operations(see #Mathematical Background), a metanum number can be represented as \[none(sign=1)|-(sign=-1)|1/(sign=2)|-1/(sign=-2)] \[mcount(10{ω^(z-1)\*mz+...+ω^2\*m3+ω\*m2+m1})'s ... bcount(10{ω^(y-1)\*by+...+ω^2\*b3+ω\*b2+b1})'s acount(10{ω^(x-1)\*ax+...+ω^2\*a3+ω\*a2+a1})'s rn(10{n})'s ... r3(10{3})'s r2(10{2})'s r1(10{1})'s r0 (layer=0)|10{ω^ω^...(layer-1 ω^'s) (ω^(ω^(z-1)\*mz+...+ω^2\*m3+ω\*m2+m1)\*mcount+...+ω^(ω^(y-1)\*by+...+ω^2\*b3+ω\*b2+b1)\*bcount+ω^(ω^(x-1)\*ax+...+ω^2\*a3+ω\*a2+a1)\*acount+ω^n\*rn+...+ω^3\*r3+ω^2\*r2+ω\*r1+r0)}10 (layer>=1)]
|
|
18
|
-
|
|
19
|
-
In Fast Growing Hierarchy, a metanum number is nearly `f_ω^ω^…(layer-1 ω^'s)…(ω^(ω^(z-1)*mz+…+ω^2*m3+ω^*m2+m1)*mcount+…+ω^(ω^(y-1)*by+…+ω^2*b3+ω*b2+b1)*bcount+ω^(ω^(x-1)*ax+…+ω^2*a3+ω*a2+a1)*acount+ω^n*rn+…+ω^3*r3+ω^2*r2+ω*r1+r0)[10](layer>=1)` or `f^mcount_(ω^(z-1)*mz+…+ω^2*m3+ω^*m2+m1)[…[f^bcount_(ω^(y-1)*by+…+ω^2*b3+ω^*b2+b1)[f^acount_(ω^(x-1)*ax+…+…ω^2*a3+ω*a2+a1)[rn 10{n}'s … r3 10^^^'s r2 10^^'s r1 10^'s r0]]…](layer=0)`
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install metanum
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Creating Instances
|
|
28
|
-
|
|
29
|
-
```javascript
|
|
30
|
-
// From a plain number
|
|
31
|
-
const a = new MetaNum(428571);
|
|
32
|
-
const b = MetaNum.fromNumber(-2.71828);
|
|
33
|
-
|
|
34
|
-
// From a string (supports scientific notation, hyper-operations, letter notation, brackets, etc.)
|
|
35
|
-
const c = new MetaNum("1.797e308");
|
|
36
|
-
const d = MetaNum.fromString("1F5"); // tetration: 10^^5
|
|
37
|
-
const e = MetaNum.fromString("E100#2"); // Hyper-E: 10^10^100 (googolplex)
|
|
38
|
-
const f = MetaNum.fromString("GF^2 E^3 123"); // letter notation
|
|
39
|
-
const g = MetaNum.fromString("Aa100"); // letter notation
|
|
40
|
-
const h = MetaNum.fromString("[[10], [1, 3]]"); // bracket notation
|
|
41
|
-
|
|
42
|
-
// From an array
|
|
43
|
-
const i = MetaNum.fromArray([2.71828, 1, 2]); // array=[[2.71828, 1, 2]], =10^^10^^10^2.71828
|
|
44
|
-
const j = MetaNum.fromArray([10], 1, 1); // layer 1
|
|
45
|
-
|
|
46
|
-
// From an object / JSON
|
|
47
|
-
const k = MetaNum.fromJSON('{"sign":1,"array":[[428571]],"layer":0}');
|
|
48
|
-
const l = MetaNum.fromObject({ sign: 1, array: [[1, 2]], layer: 0 });
|
|
49
|
-
|
|
50
|
-
// From BigInt
|
|
51
|
-
const m = MetaNum.fromBigInt(10n ** 100n);
|
|
52
|
-
|
|
53
|
-
// From Hyper-E notation
|
|
54
|
-
const n = MetaNum.fromHyperE("EE100");
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Constants
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
MetaNum.MAX_SAFE_INTEGER // 9007199254740991
|
|
61
|
-
MetaNum.E // log10(MSI)=15.954589770191
|
|
62
|
-
MetaNum.POSITIVE_INFINITY // Infinity
|
|
63
|
-
MetaNum.NEGATIVE_INFINITY // -Infinity
|
|
64
|
-
MetaNum.GRAHAMS_NUMBER // Graham's number (approximation)
|
|
65
|
-
MetaNum.TRITRI // 3↑↑↑3 = 3^^^3
|
|
66
|
-
MetaNum.QqQe308 // QqQe308 (for incremental games)
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Basic Usage
|
|
70
|
-
|
|
71
|
-
```javascript
|
|
72
|
-
// Arithmetic
|
|
73
|
-
const sum = MetaNum.add(15, 27); // 42 (static)
|
|
74
|
-
const diff = new MetaNum(27).sub(15); // 12 (instance)
|
|
75
|
-
const product = new MetaNum(15).mul(27); // 405
|
|
76
|
-
const quotient = new MetaNum(27).div(15); // 1.8
|
|
77
|
-
|
|
78
|
-
// Power & roots
|
|
79
|
-
new MetaNum(2).pow(10); // 1024
|
|
80
|
-
new MetaNum(100).sqrt(); // 10
|
|
81
|
-
new MetaNum(27).cbrt(); // 3
|
|
82
|
-
new MetaNum(8).root(3); // 2
|
|
83
|
-
new MetaNum(10).exp(); // e^10
|
|
84
|
-
|
|
85
|
-
// Logarithms
|
|
86
|
-
new MetaNum(100).log10(); // 2
|
|
87
|
-
new MetaNum(8).log(2); // 3
|
|
88
|
-
new MetaNum(Math.E).ln(); // 1
|
|
89
|
-
|
|
90
|
-
// Comparison
|
|
91
|
-
const x = new MetaNum(10), y = new MetaNum(20);
|
|
92
|
-
x.lt(y); // true
|
|
93
|
-
x.gt(y); // false
|
|
94
|
-
x.eq(y); // false
|
|
95
|
-
x.lte(y); // true
|
|
96
|
-
x.gte(y); // false
|
|
97
|
-
x.neq(y); // true
|
|
98
|
-
x.min(y); // 10
|
|
99
|
-
x.max(y); // 20
|
|
100
|
-
|
|
101
|
-
// Comparison with tolerance
|
|
102
|
-
x.eq_tolerance(new MetaNum(10.0001), 1e-3); // true
|
|
103
|
-
x.cmp_tolerance(y, 1e-7); // -1
|
|
104
|
-
|
|
105
|
-
// Sign checks
|
|
106
|
-
x.ispos(); // true
|
|
107
|
-
x.isneg(); // false
|
|
108
|
-
x.isNaN(); // false
|
|
109
|
-
x.isFinite(); // true
|
|
110
|
-
x.isint(); // true
|
|
111
|
-
|
|
112
|
-
// Rounding
|
|
113
|
-
new MetaNum(3.7).floor(); // 3
|
|
114
|
-
new MetaNum(3.2).ceil(); // 4
|
|
115
|
-
new MetaNum(3.5).round(); // 4
|
|
116
|
-
|
|
117
|
-
// Reciprocal & absolute
|
|
118
|
-
new MetaNum(4).rec(); // 0.25
|
|
119
|
-
new MetaNum(-5).abs(); // 5
|
|
120
|
-
new MetaNum(5).neg(); // -5
|
|
121
|
-
|
|
122
|
-
// Factorial & Gamma
|
|
123
|
-
new MetaNum(5).fact(); // 120
|
|
124
|
-
new MetaNum(0.5).gamma(); // Γ(0.5) = √π
|
|
125
|
-
|
|
126
|
-
// Modulo
|
|
127
|
-
new MetaNum(10).mod(3); // 1
|
|
128
|
-
|
|
129
|
-
// Lambert W function
|
|
130
|
-
new MetaNum(1).lambertw(); // Ω ≈ 0.5671
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Hyper-Operations (Tetration & Beyond)
|
|
134
|
-
|
|
135
|
-
```javascript
|
|
136
|
-
// Tetration: a^^b
|
|
137
|
-
new MetaNum(2).tetr(3); // 2^^3 = 2^2^2 = 16
|
|
138
|
-
new MetaNum(2).tetr(4); // 2^^4 = 65536
|
|
139
|
-
MetaNum.tetr(2, 5); // 2^^5
|
|
140
|
-
|
|
141
|
-
// With payload (offset)
|
|
142
|
-
new MetaNum(10).tetr(2, new MetaNum(5)); // 10^^2 with payload 5
|
|
143
|
-
|
|
144
|
-
// Pentation: a^^^b
|
|
145
|
-
new MetaNum(2).pent(3); // 2^^^3
|
|
146
|
-
|
|
147
|
-
// General arrow notation: a↑^n b
|
|
148
|
-
new MetaNum(2).arrow(3)(4); // 2↑↑↑4 (pentation)
|
|
149
|
-
MetaNum.arrow(3, 4, 3); // 3↑↑↑↑3 = g_1
|
|
150
|
-
|
|
151
|
-
// Chain notation
|
|
152
|
-
new MetaNum(2).chain(4, 3); // 2→4→3
|
|
153
|
-
|
|
154
|
-
// Aperiation: a↑^a a
|
|
155
|
-
new MetaNum(2).aper(3); // 2↑↑↑2 = 4
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Super-logarithm & Super-root
|
|
159
|
-
|
|
160
|
-
```javascript
|
|
161
|
-
// Super-logarithm (inverse of tetration)
|
|
162
|
-
new MetaNum(16).slog(2); // slog_2(16) = 3
|
|
163
|
-
new MetaNum(65536).slog(); // slog_10(65536) ≈ 2
|
|
164
|
-
|
|
165
|
-
// Super-square-root
|
|
166
|
-
new MetaNum(27).ssrt(); // ssqrt(27)
|
|
167
|
-
|
|
168
|
-
// Linear super-root
|
|
169
|
-
new MetaNum(100).linear_sroot(3); // ³ss̅r̅t̅(100)
|
|
170
|
-
|
|
171
|
-
// Layer arithmetic
|
|
172
|
-
new MetaNum(10).layeradd(3); // add 3 layers of exponentiation
|
|
173
|
-
new MetaNum(10).layeradd10(3); // 10^^3 (explicit base 10)
|
|
174
|
-
|
|
175
|
-
// General hyperoperation inverses: if a{b}c = d then d.hyper_log(a)(b) = c and d.hyper_root(c)(b) = a
|
|
176
|
-
MetaNum(14).hyper_log(2)(0); // 2*7 = 14 → 7
|
|
177
|
-
MetaNum(100000).hyper_log(10)(1); // 10^5 → 5
|
|
178
|
-
MetaNum(65536).hyper_log(2)(2); // 2↑↑4 → 4 (slog)
|
|
179
|
-
MetaNum(65536).hyper_root(4)(2); // 2↑↑4 → 2 (base recovery)
|
|
180
|
-
MetaNum(10).arrow(3)(3).hyper_root(3)(3); // 10↑↑↑3 → 10
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## Hyper-Operations up to ε₀
|
|
184
|
-
|
|
185
|
-
These functions represent iterated diagonalizations at increasing ordinal levels from ω to ε₀:
|
|
186
|
-
|
|
187
|
-
```javascript
|
|
188
|
-
const x = new MetaNum(10);
|
|
189
|
-
|
|
190
|
-
// Level ω: diagonalize ω*y (→ a↑^a a)
|
|
191
|
-
x.aperiote(3); // aper(3) = h10
|
|
192
|
-
|
|
193
|
-
// Level ω+1: iterate aperiote
|
|
194
|
-
x.expande(3); // expa(3) = h11
|
|
195
|
-
|
|
196
|
-
// Level ω+2: iterate expande
|
|
197
|
-
x.multiexpande(3); // muea(3) = h12
|
|
198
|
-
|
|
199
|
-
// Level ω+3: iterate multiexpande
|
|
200
|
-
x.powerexpande(3); // poea(3) = h13
|
|
201
|
-
|
|
202
|
-
// Level ω*2: diagonalize ω+y
|
|
203
|
-
x.aperioexpande(3); // apea(3) = h20
|
|
204
|
-
|
|
205
|
-
// Level ω*2+1: iterate aperioexpande
|
|
206
|
-
x.explode(3); // expl(3) = h21
|
|
207
|
-
|
|
208
|
-
// Level ω*2+2: iterate explode
|
|
209
|
-
x.multiexplode(3); // muel(3) = h22
|
|
210
|
-
|
|
211
|
-
// Level ω*3: diagonalize ω*2+y
|
|
212
|
-
x.aperioexplode(3); // apel(3) = h30
|
|
213
|
-
|
|
214
|
-
// Level ω*3+1: iterate aperioexplode
|
|
215
|
-
x.detonate(3); // deto(3) = h31
|
|
216
|
-
|
|
217
|
-
// Level ω*4: diagonalize ω*3+y
|
|
218
|
-
x.aperiodetonate(3); // apdt(3) = h40
|
|
219
|
-
|
|
220
|
-
// Level ω^2: diagonalize ω*y
|
|
221
|
-
x.aperionate(3); // apeo(3) = h100
|
|
222
|
-
|
|
223
|
-
// Level ω^2+1: iterate aperionate
|
|
224
|
-
x.megote(3); // mego(3) = h101
|
|
225
|
-
|
|
226
|
-
// Level ω^2+2: iterate megote
|
|
227
|
-
x.multimegote(3); // mume(3) = h102
|
|
228
|
-
|
|
229
|
-
// Level ω^2+ω: diagonalize ω^2+y
|
|
230
|
-
x.aperimegote(3); // apmg(3) = h110
|
|
231
|
-
|
|
232
|
-
// Level ω^2+ω+1: iterate aperimegote
|
|
233
|
-
x.megoexpande(3); // mgea(3) = h111
|
|
234
|
-
|
|
235
|
-
// Level ω^2+ω*2: diagonalize ω^2+ω+y
|
|
236
|
-
x.aperimegoexpande(3); // apme(3) = h120
|
|
237
|
-
|
|
238
|
-
// Level ω^2*2: diagonalize ω^2+ω*y
|
|
239
|
-
x.megoaperionate(3); // mgao(3) = h200
|
|
240
|
-
|
|
241
|
-
// Level ω^2*2+1: iterate megoaperionate
|
|
242
|
-
x.gigote(3); // gigo(3) = h201
|
|
243
|
-
|
|
244
|
-
// Level ω^2*2+ω: diagonalize ω^2*2+y
|
|
245
|
-
x.aperigigote(3); // apgg(3) = h210
|
|
246
|
-
|
|
247
|
-
// Level ω^2*3: diagonalize ω^2*2+ω*y
|
|
248
|
-
x.gigoaperionate(3); // ggap(3) = h300
|
|
249
|
-
|
|
250
|
-
// Level ω^3: diagonalize ω^2*y
|
|
251
|
-
x.aperiatote(3); // apat(3) = h1000
|
|
252
|
-
|
|
253
|
-
// Level ω^3+1: iterate aperiatote
|
|
254
|
-
x.powiainate(3); // pwan(3) = h1001
|
|
255
|
-
|
|
256
|
-
// Level ω^3+ω: diagonalize ω^3+y
|
|
257
|
-
x.expandainate(3); // epan(3) = h1010
|
|
258
|
-
|
|
259
|
-
// Level ω^3+ω^2: diagonalize ω^3+ω*y
|
|
260
|
-
x.megodainate(3); // mgan(3) = h1100
|
|
261
|
-
|
|
262
|
-
// Level ω^3*2: diagonalize ω^3+ω^2*y
|
|
263
|
-
x.powiairate(3); // pwar(3) = h2000
|
|
264
|
-
|
|
265
|
-
// Level ω^4: diagonalize ω^3*y
|
|
266
|
-
x.aperioguate(3); // apgu(3) = h10000
|
|
267
|
-
|
|
268
|
-
// Level ω^ω: diagonalize ω^x (layer 1 transition)
|
|
269
|
-
x.iterate(3); // iter(3) = hww
|
|
270
|
-
|
|
271
|
-
// Level ω^ω+1: iterate ω^ω level operations
|
|
272
|
-
x.itermult(3); // itmu(3) = hw01
|
|
273
|
-
|
|
274
|
-
// Level ω^ω*2: (ω^ω)*2 = ω^ω + ω^base
|
|
275
|
-
x.cuboiter(3); // cube(3) = hwx2
|
|
276
|
-
|
|
277
|
-
// Level ω^(ω+1): ω^(ω+1) = ω^ω*ω → ω^(ω*y)
|
|
278
|
-
x.expoiter(3); // expo(3) = hwa1
|
|
279
|
-
|
|
280
|
-
// Level ω^(ω*2): ω^(ω*2) = ω^(ω+base)
|
|
281
|
-
x.trioterate(3); // tria(3) = hwm2
|
|
282
|
-
|
|
283
|
-
// Level ω^(ω^2): diagonalize ω^(ω*y)
|
|
284
|
-
x.trixxate(3); // trix(3) = hwp2
|
|
285
|
-
|
|
286
|
-
// Level ω^(ω^ω): diagonalize ω^(ω^y) (layer 2)
|
|
287
|
-
x.aperixxate(3); // apix(3) = hwpw
|
|
288
|
-
|
|
289
|
-
// Level ε₀ = ω↑↑ω: diagonalize ω↑↑y (layer 3+)
|
|
290
|
-
x.epsilonate(3); // epsl(3) = hepsl
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
## Inverse Operations
|
|
294
|
-
|
|
295
|
-
Each expansion operation has a corresponding inverse for decrementing ordinal structure:
|
|
296
|
-
|
|
297
|
-
```javascript
|
|
298
|
-
x.i_aper(z) // i10 = inverse of aperiote
|
|
299
|
-
x.i_expa(z) // i11 = inverse of expande
|
|
300
|
-
x.i_muea(z) // i12 = inverse of multiexpande
|
|
301
|
-
x.i_poea(z) // i13 = inverse of powerexpande
|
|
302
|
-
x.i_apea(z) // i20 = inverse of aperioexpande
|
|
303
|
-
x.i_expl(z) // i21 = inverse of explode
|
|
304
|
-
x.i_muel(z) // i22 = inverse of multiexplode
|
|
305
|
-
x.i_apel(z) // i30 = inverse of aperioexplode
|
|
306
|
-
x.i_deto(z) // i31 = inverse of detonate
|
|
307
|
-
x.i_apdt(z) // i40 = inverse of aperiodetonate
|
|
308
|
-
x.i_apeo(z) // i100 = inverse of aperionate
|
|
309
|
-
x.i_mego(z) // i101 = inverse of megote
|
|
310
|
-
x.i_mume(z) // i102 = inverse of multimegote
|
|
311
|
-
x.i_apmg(z) // i110 = inverse of aperimegote
|
|
312
|
-
x.i_mgea(z) // i111 = inverse of megoexpande
|
|
313
|
-
x.i_apme(z) // i120 = inverse of aperimegoexpande
|
|
314
|
-
x.i_mgao(z) // i200 = inverse of megoaperionation
|
|
315
|
-
x.i_gigo(z) // i201 = inverse of gigote
|
|
316
|
-
x.i_apgg(z) // i210 = inverse of aperigigote
|
|
317
|
-
x.i_ggap(z) // i300 = inverse of gigoaperionate
|
|
318
|
-
x.i_apat(z) // i1000 = inverse of aperiatotion
|
|
319
|
-
x.i_pwan(z) // i1001 = inverse of powiainate
|
|
320
|
-
x.i_epan(z) // i1010 = inverse of expandainate
|
|
321
|
-
x.i_mgan(z) // i1100 = inverse of megodainate
|
|
322
|
-
x.i_pwar(z) // i2000 = inverse of powiairate
|
|
323
|
-
x.i_apgu(z) // i10000 = inverse of aperioguate
|
|
324
|
-
x.i_iter(z) // iww = inverse of iter
|
|
325
|
-
x.i_itmu(z) // iw01 = inverse of itermult
|
|
326
|
-
x.i_cube(z) // iwx2 = inverse of cuboiter
|
|
327
|
-
x.i_expo(z) // iwa1 = inverse of expoiter
|
|
328
|
-
x.i_tria(z) // iwm2 = inverse of trioterate
|
|
329
|
-
x.i_trix(z) // iwp2 = inverse of trixxate
|
|
330
|
-
x.i_apix(z) // iwpw = inverse of aperixxate
|
|
331
|
-
x.i_epsl(z) // iepsl = inverse of epsilonate
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
### The operations follow n{λ}b = n{λ[b]}n exactly
|
|
335
|
-
|
|
336
|
-
Every operation above is evaluated with the unified limit rule `n{λ}b = n{λ[b]}n` — the final operand is the **base** n, never b. Whenever the reduced level λ[y] still fits a Cantor-normal-form coefficient row the whole fundamental-sequence cascade is evaluated:
|
|
337
|
-
|
|
338
|
-
```javascript
|
|
339
|
-
MetaNum(3).iterate(5); // 3{ω^ω}5 = 3{ω^5}3 = 3{ω^4*3}3 = …
|
|
340
|
-
// … = 3{ω^4*2+ω^3*2+ω^2*2+ω*2+2}3 → layer=0, top row [1,2,2,2,2,2]
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
Levels ≥ ω^ω have no finite coefficient row, so the result is stored as the compact **layer marker** of λ[y] (see the representation rule above: layer L ⇒ `10{ω^ω^…(L ω^'s)…^(ω^'s polynomial)}10`):
|
|
344
|
-
|
|
345
|
-
so the encoded ordinals grow with the operation (`iter < itmu < cube < expo < tria < trix < apix < epsl`) and with y, and `epsilonate(MSI)` is exactly the library's ε-tower cap.
|
|
346
|
-
|
|
347
|
-
### Fractional hyperoperation levels
|
|
348
|
-
|
|
349
|
-
Levels interpolate geometrically; `x{n+f}y = x{n+1}(θf)` with `θf` continuous between `x{n}y` (f=0) and `x{n+1}y` (f=1). For the canonical diagonal this is exactly `10{n+f}10 = 10{n+1}(2·5^f)`:
|
|
350
|
-
|
|
351
|
-
```javascript
|
|
352
|
-
MetaNum(10).arrow(3.5)(10); // 10{3.5}10 = 10{4}(2·5^0.5)
|
|
353
|
-
MetaNum(10).arrow(3.2)(10); // monotone between 10{3}10 and 10{4}10
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Non-integer arguments at ordinal levels
|
|
357
|
-
|
|
358
|
-
The same continuity applies to the ω-and-above operations. Successor levels follow `x{α}(m+f) = x{α-1}` applied m times to `x^f`; the ω level matches `aperiote` exactly, so composition identity holds verbatim:
|
|
359
|
-
|
|
360
|
-
```javascript
|
|
361
|
-
MetaNum(10).expande(2.1); // 10{ω+1}2.1 = 10{ω}10{ω}(10^0.1)
|
|
362
|
-
MetaNum(10).expande(2); // 10{ω}10 (continuous at the integers)
|
|
363
|
-
MetaNum(10).multiexpande(2.1); // (10{ω+1})²(10^0.1)
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
**Limit levels** take the fundamental sequence at the full (fractional) `y`. The sequence can then carry fractional coefficients, which resolve against the base x because on the diagonal ω reads as x:
|
|
367
|
-
|
|
368
|
-
- ω^(k)·(c+f) = ω^(k)·c + ω^(k-1)·(x·f), applied top-down (ω^0.1 = x^0.1), so only the constant term can still be fractional;
|
|
369
|
-
- a leftover fractional constant γ+f is one level of interpolation: x{γ+f}x = x{γ+1}(2·(x/2)^f) — continuous at f=0 because x{γ+1}2 = x{γ}x.
|
|
370
|
-
|
|
371
|
-
**Successor levels** keep `x{α}(m+f) = x{α-1}` applied m times to `x^f`, so the value grows with f inside the interval and converges to the next integer as f → 1:
|
|
372
|
-
|
|
373
|
-
```javascript
|
|
374
|
-
MetaNum(10).h21(2.0001); // Ba2.218Ab9 f → 0: cascade bottoming at ω
|
|
375
|
-
MetaNum(10).h21(2.5); // Ba1.772Ad9 the cascade deepens with f
|
|
376
|
-
MetaNum(10).h21(2.99); // Ba2.447Aj9 → converges to h21(10,3) = Ba1.000Ak9
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
For the ω+1 / ω+2 / ω+3 levels the applications after the first still have an operand inside MSI, so those are evaluated directly by the rule (that is the `10{ω}10{ω}(10^0.1)` composition above) — which is also the exact identity. An iteration count beyond direct evaluation diagonalizes through the engine's huge-argument convention (y plus one α-level marker row). Then we have:
|
|
380
|
-
|
|
381
|
-
10{ω\*2}2.1=10{ω+2.1}10=10{ω+3}2\*5^0.1 (because 10{ω+2}10=10{ω+3}2)
|
|
382
|
-
|
|
383
|
-
3{ω\*2}2.1=3{ω+2.1}3=3{ω+3}2\*1.5^0.1
|
|
384
|
-
|
|
385
|
-
10{ω^2}2.1=10{ω\*2.1}10=10{ω\*2+10\*0.1}10=10{ω\*2+1}10
|
|
386
|
-
|
|
387
|
-
3{ω^2}2.1=3{ω\*2.1}3=3{ω\*2+3\*0.1}10=3{ω\*2+0.3}3=3{ω\*2+1}2\*1.5^0.3
|
|
388
|
-
|
|
389
|
-
10{ω^ω}2.1=10{ω^2.1}10=10{ω^2\*10^0.1}10=10{ω^2\*1.258925}10=10{ω^2\*1+ω\*2+5.8925}10=10{ω^2\*1+ω\*2+6}2*5^0.8925
|
|
390
|
-
|
|
391
|
-
3{ω^ω}2.1=3{ω^2.1}3=3{ω^2\*3^0.1}3=3{ω^2\*1.116123}3=3{ω^2\*1+1.045107}3=3{ω^2\*1+2}2*1.5^0.045107
|
|
392
|
-
|
|
393
|
-
## BEAF Operations
|
|
394
|
-
|
|
395
|
-
Bowers' Exploding Array Function (BEAF) is supported via ordinal arithmetic for 3+ arguments:
|
|
396
|
-
|
|
397
|
-
```javascript
|
|
398
|
-
// BEAF(a,b,c,d,e,f,...) = a{...+ω^3*(f-1)+ω^2*(e-1)+ω*(d-1)+c}b (the constant term keeps its value; ω-and-above coefficients decrement by 1)
|
|
399
|
-
|
|
400
|
-
// 3-entry: {a,b,c} = a↑^c b (standard up-arrow notation)
|
|
401
|
-
MetaNum.BEAF(3, 3, 2); // 3↑↑3 = 7625597484987
|
|
402
|
-
MetaNum.BEAF(3, 3, 3); // 3↑↑↑3 = tritri
|
|
403
|
-
|
|
404
|
-
// 4-entry: {a,b,c,d} = a(ω*(d-1)+c level operation)b
|
|
405
|
-
MetaNum.BEAF(2, 2, 1, 2); // 2{ω}2
|
|
406
|
-
MetaNum.BEAF(3, 3, 3, 3); // 3{ω*2+3}3
|
|
407
|
-
|
|
408
|
-
// 5+ entry: ordinal arithmetic
|
|
409
|
-
MetaNum.BEAF(10, 2, 1, 1, 2); // 10{ω^2}2
|
|
410
|
-
MetaNum.BEAF(3, 3, 3, 3, 2); // 3{ω^2+ω*2+3}3
|
|
411
|
-
MetaNum.BEAF(4, 5, 6, 7, 8, 9); // 4{ω^3*8+ω^2*7+ω*6+6}5
|
|
412
|
-
|
|
413
|
-
// Parse BEAF string notation
|
|
414
|
-
MetaNum.fromBeaf("{3,3,3}"); // 3↑↑↑3
|
|
415
|
-
MetaNum.fromBeaf("{3,3,3,3}"); // 3{ω*2+3}3
|
|
416
|
-
MetaNum.fromBeaf("{10,2,1,1,2}"); // 10{ω^2}2
|
|
417
|
-
|
|
418
|
-
// Convert to BEAF string
|
|
419
|
-
new MetaNum(7625597484987).toBeaf(); // "{7625597484987}"
|
|
420
|
-
MetaNum.BEAF(3,3,3).toBeaf(); // "{3638334640023.7783}"
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
### nested BEAF
|
|
424
|
-
|
|
425
|
-
nested BEAF: {a,{b,c,d,e},f,g,h}
|
|
426
|
-
|
|
427
|
-
An argument exceeding MSI supremum-collapses (use fundamental sequences rules):
|
|
428
|
-
|
|
429
|
-
ω*i+HUGE ≈ ω*(i+1), ω^i*HUGE ≈ ω^(i+1), etc.
|
|
430
|
-
|
|
431
|
-
lower coefficients are swallowed, and the result anchors at that argument's value.
|
|
432
|
-
|
|
433
|
-
```javascript
|
|
434
|
-
MetaNum.BEAF(4, MetaNum.BEAF(4, 2, 3, 5), 3, 5); // 4{ω*4+3}4{ω*4+3}2
|
|
435
|
-
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
## Hardy Hierarchy
|
|
439
|
-
|
|
440
|
-
`MetaNum.hardy(n)` evaluates the Hardy hierarchy `H_α(10)` where the ordinal α is built from the decimal digits of n (base 10, `hardy(1234) = H_{ω³+ω²·2+ω·3+4}(10)`):
|
|
441
|
-
|
|
442
|
-
```javascript
|
|
443
|
-
MetaNum.hardy(10); // H_ω(10) = 20
|
|
444
|
-
MetaNum.hardy(10.5); // H_ω(10+0.5) = 21
|
|
445
|
-
MetaNum.hardy(11); // H_{ω+1}(10) = 22
|
|
446
|
-
MetaNum.hardy(100); // H_{ω²}(10) = 10240
|
|
447
|
-
MetaNum.hardy(100.5); // H_{ω²}(10+0.5) ≈ 11085
|
|
448
|
-
MetaNum.hardy(1234); // H_{ω³+ω²·2+ω·3+4}(10), exact for small levels and engine-collapsed (F_j = H^{ω^j}) for deep segments
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
Recursion rules:
|
|
452
|
-
-`H_0(n) = n`, `H_{α+1}(n) = H_α(n+1)` (only +1, never iterated),
|
|
453
|
-
-For fractional 0<f<1 we have `H_{α+f}(n) = H_α(n+f)`,
|
|
454
|
-
-`H_λ(n) = H_{λ[n]}(n)` with the CNF fundamental sequences.
|
|
455
|
-
|
|
456
|
-
### hardy(x, base) and FGH(x, y)
|
|
457
|
-
|
|
458
|
-
The second argument is the **base**: the ordinal is read off the digits of x in that base (default 10), and the hierarchy argument is the base itself. The base must be an integer in `[2, 1000]`.
|
|
459
|
-
|
|
460
|
-
```javascript
|
|
461
|
-
MetaNum.hardy(10, 8); // "10" reads as "12" in base 8 → H_{ω+2}(8) = 20
|
|
462
|
-
MetaNum.hardy(10, 4); // "10" reads as "22" in base 4 → H_{ω*2+2}(4) = 24
|
|
463
|
-
MetaNum.hardy(5, 8); // H_5(8) = 13
|
|
464
|
-
MetaNum.hardy(64, 8); // "100" base 8 → H_{ω²}(8) = 2048
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
`MetaNum.fgh(x, y)` is the fast-growing hierarchy entry, defined through hardy: `FGH(x, y) = H_{y^x}(y) = hardy(y^x, y)` (same base validation).
|
|
468
|
-
|
|
469
|
-
```javascript
|
|
470
|
-
MetaNum.fgh(3, 10); // = hardy(1000, 10) = H_{ω³}(10)
|
|
471
|
-
MetaNum.fgh(2, 8); // = hardy(64, 8) = 2048
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
For `base ≠ 10` the plain finite inputs take the base-`base` digit path; structured / power-tower inputs keep the decimal-specific shadowing and are rejected there.
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
### Hardy beyond ω^ω
|
|
479
|
-
|
|
480
|
-
For n ≥ 1e10 the leading exponent k ≥ 10 itself converted to a base-10 ordinal, so `hardy(1e11) = H_{ω^(ω+1)}(10)` sits at the `10{ω+1}10` scale (via `H_{ω^β}(n) = F_β(n)`), The value is evaluated per the definition (from below),so it is strictly below the matching engine hyper-op:
|
|
481
|
-
|
|
482
|
-
```javascript
|
|
483
|
-
MetaNum.hardy(1e10); // = H_{ω^ω}(10) = H_{ω^10}(10), array exactly [3086.036065328153, 9,9,9,9,9,9,9,9] — below 10{10}10
|
|
484
|
-
MetaNum.hardy(1e11); // = H_{ω^(ω+1)}(10) — below 10{ω+1}10 (expande(10,10))
|
|
485
|
-
MetaNum.hardy("1e10+11"); // H_{ω^ω+ω+1}(10) = H_{ω^ω}(22) → the truncated exact tower [3086.036…, 21×19] — the single row [非整数, 21, 21, …, 21], format "X23"
|
|
486
|
-
MetaNum.hardy("1e10+22"); // H_{ω^ω+ω*2+2}(10) → [3086.036…, 47×19], format "X49"
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
Once the definitional from-below tower `[c0, (n1−1)×(n1−2)]` (n1 = hardy(rest)) no longer fits `maxCols`, hardy keeps the TRUNCATED cascade `[3086.036…, (n1−1)×(maxCols−1)]` — the tower level n1−1 over the definitional base — instead of the engine value.
|
|
490
|
-
|
|
491
|
-
Fractional inputs collapse into ONE plain row (the fractional hyper-operation result) and hardy stays continuous across the integers:
|
|
492
|
-
|
|
493
|
-
```javascript
|
|
494
|
-
MetaNum.hardy(1e10) < MetaNum.hardy("1e10+0.5") < MetaNum.hardy(1e10+1); // single rows throughout
|
|
495
|
-
MetaNum.hardy("1e10+0.5"); // [4581.009607833985, 10,10,10,10,10,10,10,10,10]
|
|
496
|
-
MetaNum.hardy("1e10+1.5"); // [10030.57513899962, 11×10]
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
Strings of the form `"AeB+C"` (`"1e10+0.5"`, `"1e16+1e13"`, …) parse to the exact decimal sum, so the digit path never reads 0.
|
|
500
|
-
|
|
501
|
-
More generally, with n = dk·10^kExp + rest: α = ω^ord(kExp)·dk + ord(rest) is built recursively (n1 = H_ord(rest)(10)), and the leading term ω^β·dk (β = ord(kExp)) is **dk applications of H_{ω^β}, one after the other on the running value** — an application is one row `[1, β]`:
|
|
502
|
-
|
|
503
|
-
```javascript
|
|
504
|
-
MetaNum.hardy(1.1e11); // H_{ω^(ω+1)+ω^ω}(10) = H_{ω^(ω+1)}(H_{ω^ω}(10)) (one row per application)
|
|
505
|
-
MetaNum.hardy(2e11); // H_{ω^(ω+1)·2}(10) = H_{ω^(ω+1)}(H_{ω^(ω+1)}(10))
|
|
506
|
-
MetaNum.hardy(3e11); // → … [8,0,1], [2,1,1] (one more row per application)
|
|
507
|
-
MetaNum.hardy(1e16 + 1e13); // H_{ω^(ω+6)}(H_{ω^(ω+3)}(10)) → … [1,6,1]
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
So hardy is monotone across this range: `hardy(9999999999) < hardy(1e10) < hardy(10000000001)`, and `hardy(1e11) < hardy(1.1e11) < hardy(2e11)`.
|
|
511
|
-
|
|
512
|
-
### Hardy of power towers: one layer per 10^ level
|
|
513
|
-
|
|
514
|
-
For a clean tower the ordinal is ω^ord(W) — exactly one ω above hardy(W) — so **every extra 10^ level in the input raises hardy's layer by ONE, and the array rows stay those of the innermost readable expansion**:
|
|
515
|
-
|
|
516
|
-
```javascript
|
|
517
|
-
MetaNum.hardy("1e308"); // layer 0 — the digit-path cascade, last rows [8,6,0,3], [8,7,0,3]
|
|
518
|
-
MetaNum.hardy("e1e308"); // layer 1 — the SAME array rows
|
|
519
|
-
MetaNum.hardy("ee1e308"); // layer 2 — the SAME array rows, and so on
|
|
520
|
-
MetaNum.hardy("e1e10"); // = layerUp(hardy(1e10)) = [[3086.036…, 9×8]] at layer 1
|
|
521
|
-
MetaNum.hardy("eee10"); // layer 2, hardy(10^^100) → layer 98, hardy(10^^MSI) → layer MSI-2
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
The layer therefore equals `floor(tower height) − 2`; towers whose bracket is a finite ω-polynomial keep the definitional base rows instead of being folded down by the standard de-layer rule.
|
|
525
|
-
|
|
526
|
-
More generally, with n = dk·10^kExp + rest: α = ω^ord(kExp)·dk + ord(rest) is built recursively (n1 = H_ord(rest)(10)), and the leading term ω^β·dk (β = ord(kExp)) is **dk applications of H_{ω^β}, one after the other on the running value** — an application is one row `[1, β]`:
|
|
527
|
-
|
|
528
|
-
```javascript
|
|
529
|
-
MetaNum.hardy(1.1e11); // H_{ω^(ω+1)+ω^ω}(10) = H_{ω^(ω+1)}(H_{ω^ω}(10)) → [3086.036065328153, 9×8], [1,1,1] (H_{ω^ω} once, then H_{ω^(ω+1)} once)
|
|
530
|
-
MetaNum.hardy(2e11); // H_{ω^(ω+1)·2}(10) = H_{ω^(ω+1)}(H_{ω^(ω+1)}(10)) → [3086.036065328153, 9×8], [8,0,1] [1,1,1]
|
|
531
|
-
MetaNum.hardy(3e11); // → … [8,0,1], [2,1,1] (one more row per application)
|
|
532
|
-
MetaNum.hardy(1e16 + 1e13); // H_{ω^(ω+6)}(H_{ω^(ω+3)}(10)) → … [8,2,1], [1,6,1]
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
So hardy is monotone across this range: `hardy(9999999999) < hardy(1e10) < hardy(10000000001)`, and `hardy(1e11) < hardy(1.1e11) < hardy(2e11)`.
|
|
536
|
-
|
|
537
|
-
### hardy input extensions
|
|
538
|
-
|
|
539
|
-
And we have hardy(1e20) = H_{ω^(ω*2)}(10), hardy(1e100)=H_{ω^(ω^2)}(10), hardy("e1e10")=H_{ω^(ω^ω)}(10), hardy("1F10")=H_{ω^^10}(10), and so on.
|
|
540
|
-
|
|
541
|
-
`MetaNum.infinity` (alias of `MetaNum.POSITIVE_INFINITY`) is the value returned once the input passes the ε₀ ceiling: any MetaNum beyond `10^^MSI` — e.g. `G600` (= 10{3}600), `3{9}3`, or a power tower taller than `10^^MSI` — has no Hardy level inside the library, so `hardy` yields Infinity.
|
|
542
|
-
|
|
543
|
-
```javascript
|
|
544
|
-
MetaNum.hardy(1e21); // hardy(1e20) < hardy(1e21) < hardy(1e22), >1e20 scientific strings expand to exact digits — the reading stays monotone
|
|
545
|
-
MetaNum.hardy(MetaNum(10).tetr(100)); // power towers shadow to ω^ω^…^ω (k ω's): hardy(10^^k) = H_ω^ω^…^ω (k ω's)(10) — the ordinal is read off the value itself (10^W → ω^ord(W))
|
|
546
|
-
MetaNum.hardy(MetaNum(10).tetr(Number.MAX_SAFE_INTEGER)); // hardy(10^^MSI) = the MetaNum limit: layer MSI-3 (the ε-tower cap)
|
|
547
|
-
MetaNum.hardy(MetaNum("G600")) // MetaNum-object > 10^^MSI should return Infinity
|
|
548
|
-
MetaNum.hardy(MetaNum.arrow(3, 9, 3)) // = Infinity (3{9}3 is far above 10^^MSI)
|
|
549
|
-
```
|
|
550
|
-
|
|
551
|
-
## Layer & Serialization
|
|
552
|
-
|
|
553
|
-
```javascript
|
|
554
|
-
// Layer manipulation
|
|
555
|
-
new MetaNum(10).layerUp(); // promote to layer+1
|
|
556
|
-
new MetaNum(10).layerDown(); // demote to layer-1
|
|
557
|
-
|
|
558
|
-
// Output formats
|
|
559
|
-
new MetaNum(123).toString(); // "123"
|
|
560
|
-
new MetaNum(1e308).toString(); // "E308"
|
|
561
|
-
new MetaNum(100).toNumber(); // 100
|
|
562
|
-
new MetaNum(100).valueOf(); // "100"
|
|
563
|
-
new MetaNum(100).toFixed(2); // "100.00"
|
|
564
|
-
new MetaNum(100).toExponential(2); // "1.00e+2"
|
|
565
|
-
new MetaNum(100).toPrecision(3); // "100"
|
|
566
|
-
new MetaNum(100).toHyperE(); // "100"
|
|
567
|
-
new MetaNum(100).toStringWithDecimalPlaces(4); // "100.0000"
|
|
568
|
-
new MetaNum(100).toJSON(); // {sign:1, array:[[100]], layer:0}
|
|
569
|
-
new MetaNum(100).format(); // letter notation (format-metanum.js), e.g. MetaNum.hardy(4166).format() → "2.397G5", optional args: format(precision, small)
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
## Utility Functions
|
|
573
|
-
|
|
574
|
-
```javascript
|
|
575
|
-
// Binomial coefficient
|
|
576
|
-
new MetaNum(10).choose(3); // C(10,3) = 120
|
|
577
|
-
|
|
578
|
-
// Hyper-operation
|
|
579
|
-
MetaNum.hyper(4, 2, 3); // 2^^3 = 16 (n=4 means tetration)
|
|
580
|
-
|
|
581
|
-
// Geometric series
|
|
582
|
-
MetaNum.sumGeometricSeries(5, 1, 2); // 1+2+4+8+16 = 31
|
|
583
|
-
MetaNum.affordGeometricSeries(100, 1, 2, 0);
|
|
584
|
-
|
|
585
|
-
// Arithmetic series
|
|
586
|
-
MetaNum.sumArithmeticSeries(5, 1, 2); // 1+3+5+7+9 = 25
|
|
587
|
-
MetaNum.affordArithmeticSeries(100, 1, 2, 0);
|
|
588
|
-
|
|
589
|
-
// Configuration
|
|
590
|
-
MetaNum.config({ maxRows: 50, maxCols: 50, serializeMode: 1, debug: 1 });
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
# Mathematical Background
|
|
594
|
-
|
|
595
|
-
The library implements the extended arrow operation which is a hierarchy of functions indexed by ordinal numbers. The representation uses Cantor normal form for ordinals, where:
|
|
596
|
-
|
|
597
|
-
- ω represents the first infinite ordinal
|
|
598
|
-
- ω^ω represents ω raised to the power of ω
|
|
599
|
-
- ε₀ is the limit of ω, ω^ω, ω^ω^ω, ...
|
|
600
|
-
|
|
601
|
-
For more information, see: <https://en.wikipedia.org/wiki/Ordinal_arithmetic>
|
|
602
|
-
|
|
603
|
-
## Definition
|
|
604
|
-
|
|
605
|
-
Let n and b be natural numbers, and α be a countable ordinal
|
|
606
|
-
|
|
607
|
-
- rule 1: If α=0, n{α}b=n×b
|
|
608
|
-
- rule 2: If α is a successor ordinal, then n{α}b =n if b=1, =n{α-1}n{α}(b-1) if b>1
|
|
609
|
-
- rule 3: If α is a limit ordinal, then n{α}b=n{α\[b]}n
|
|
610
|
-
- rule 4: Operations are calculated from right to left
|
|
611
|
-
|
|
612
|
-
where α\[b] denotes the b-th element of the fundamental sequence assign to the limit ordinal of α, see also fundamental sequences for limit ordinals written in Cantor normal form:
|
|
613
|
-
|
|
614
|
-
- ω\[n]=n
|
|
615
|
-
- ω^(α+1)\[n]=ω^α×n where ω^α×n=ω^α+ω^α+...+ω^α with n ω^α's
|
|
616
|
-
- ω^α\[n]=ω^(α\[n]) if and only if α is a limit ordinal
|
|
617
|
-
- (ω^(α_1)+ω^(α_2)+...+ω^(α_k))\[n]=ω^(α_1)+ω^(α_2)+...+ω^(α_k)\[n], where α_1>=α_2>=...>=α_k
|
|
618
|
-
- ε₀\[0]=1 and ε₀\[n+1]=ω^ε₀\[n]
|
|
619
|
-
|
|
620
|
-
### The application count of each ordinal row
|
|
621
|
-
|
|
622
|
-
Expanding rules 2-3 all the way down shows that **only the top row depends on the argument b**
|
|
623
|
-
— every row below it is produced by decomposing with the base n as the operand:
|
|
624
|
-
- successor α: n{α}b = n{α-1}^(b-2) (n{α-1}n), so the α-1 row carries **b-2** applications and every lower row (which comes from n{α-1}n, n{α-2}n, … whose operand is n) carries **n-2**;
|
|
625
|
-
- limit α: rule 3 first rewrites n{α}b = n{α\[b]}n, so the operand is n at every level and **all** rows carry **n-2**.
|
|
626
|
-
- when expanded ordinal rows >= maxRows, it is truncated, and array[0] is default [10] and the first ordinal row count add 1.(to get precise value)
|
|
627
|
-
|
|
628
|
-
```javascript
|
|
629
|
-
MetaNum(10).h13(20); // 10{ω+3}20 = 10{ω+2}^18 10{ω+1}^8 10{ω}^8 10{ω}10
|
|
630
|
-
// array → [[1e10,8,8,8,8,8,8,8,8], [8,0,1], [8,1,1], [18,2,1]]
|
|
631
|
-
MetaNum(10).h12(20); // 10{ω+2}20 → [8,0,1] [18,1,1]
|
|
632
|
-
MetaNum(3).h13(20); // 3{ω+3}20 → [1,0,1] [1,1,1] [18,2,1] (x-2 = 1)
|
|
633
|
-
MetaNum(10).h21(20); // 10{ω*2+1}20 = 10{ω*2}^18 (10{ω*2}10)
|
|
634
|
-
// 10{ω*2}10 = 10{ω+10}10 → the ω..ω+9 cascade, every count x-2 = 8
|
|
635
|
-
// array → [[…,8,…], [8,0,1] … [8,9,1], [18,0,2]]
|
|
636
|
-
MetaNum(10).h22(20); // … + [8,0,2] + [18,1,2] (ω*2 row = 8, ω*2+1 row = 18)
|
|
637
|
-
MetaNum(3).h21(20); // 3{ω*2+1}20 → [1,0,1] [1,1,1] [1,2,1] [18,0,2] (x-2 = 1)
|
|
638
|
-
MetaNum(10).h100(20); //10{ω^2}20=10{ω*20}10=10{ω*19+9}^8 10{ω*19+8}^8 ... 10{ω*18+1}^9 10
|
|
639
|
-
// array → [[10], [9,1,18], [8,2,18] … [8,8,19], [8,9,19]] (maxrows=20)
|
|
640
|
-
```
|
|
641
|
-
|
|
642
|
-
## Examples
|
|
643
|
-
|
|
644
|
-
642663{0}178187=642663×178187=114514191981
|
|
645
|
-
|
|
646
|
-
10{1}5=10{0}10{1}4=10{0}10{0}10{1}3=10{0}10{0}10{0}10{1}2=10{0}10{0}10{0}10{0}10{1}1=10×10×10×10×10=10^5=100000
|
|
647
|
-
|
|
648
|
-
10{2}4=10{1}10{2}3=10{1}10{1}10{2}2=10{1}10{1}10{1}10{2}1=10{1}10{1}10{1}10=10^(10^(10000000000))
|
|
649
|
-
|
|
650
|
-
10{3}3=10{2}10{2}10=10{2} 9(10{1})'s 10=10↑↑(10^10^10^10^10^10^10^10^10000000000)
|
|
651
|
-
|
|
652
|
-
3{ω}5=3{5}3=3{4}3{5}2=3{4}3{4}3=3{4}3{3}3{3}3=3{4}3{3}3{2}3{2}3=3{4}3{3}3{2}3{1}3{1}3=3↑↑↑↑3↑↑↑3↑↑7625597484987
|
|
653
|
-
|
|
654
|
-
5{ω+1}4=5{ω}5{ω+1}3=5{ω}5{ω}5{ω+1}2=5{ω}5{ω}5{ω}5{ω+1}1=5{ω}5{ω}5{ω}5=5{ω}5{ω}5{5}5=5{ω}5{5{5}5}5=5{5{5{5}5}5}5
|
|
655
|
-
|
|
656
|
-
4{ω+2}3=4{ω+1}4{ω+1}4=4{ω+1}4{ω}4{ω}4{ω}4=4{ω+1}4{4{4{4}4}4}4=4{ω}4{ω}... with 4{4{4{4}4}4}4 4's
|
|
657
|
-
|
|
658
|
-
10{ω×2}10=10{ω+10}10=9(10{ω+9})'s 10=8(10{ω+9})'s 9(10{ω+8})'s 10=8(10{ω+9})'s 8(10{ω+8})'s ... 8(10{ω+1})'s 8(10{ω})'s 8(10{9})'s ... 8(10{1})'s 10000000000
|
|
659
|
-
|
|
660
|
-
10{ω^2}4=10{(ω^2)[4]}10=10{ω×4}10=10{(ω×4)[10]}10=10{ω×3+10}10=10{ω×3+9}10{ω×3+10}9=...=10{ω×3+9} 8(10{ω×3+8})'s ... 8(10{ω×3+1})'s 8(10{ω×3})'s 8(10{ω×2+9})'s ... 8(10{ω})'s ... 8(10{1})'s 10000000000
|
|
661
|
-
|
|
662
|
-
10{ω^ω}4=10{(ω^ω)[4]}10=10{ω^4}10=10{(ω^4)[10]}10=10{ω^3×10}10=... (every limit step ends on the base 10; successor steps iterate) ... 8(10{1})'s 10000000000
|
|
663
|
-
|
|
664
|
-
10{ω^(ω^2)}4=10{(ω^(ω^2))[4]}10=10{ω^(ω×ω)}10=10{ω^(ω×4)}10=10{ω^(ω×3+10)}10=... (rule 3: each FS step ends on the base 10)
|
|
665
|
-
|
|
666
|
-
10{ε₀}4=10{ε₀[4]}10=10{ω^(ω^(ω^ω))}10=10{ω^(ω^(ω^10))}10=... (ε₀[n+1]=ω^(ε₀[n]), final operand 10)
|
|
667
|
-
|
|
668
|
-
# dlsdl's Letter Notation
|
|
669
|
-
|
|
670
|
-
> Formal semantics and the design decisions behind the notation are recorded in
|
|
671
|
-
> [docs/notation-semantics.md](docs/notation-semantics.md); the executable
|
|
672
|
-
> regression suite is [test_mixed.js](test_mixed.js).
|
|
673
|
-
|
|
674
|
-
Modified from PsiCubed's letter notation(<https://googology.fandom.com/wiki/User_blog:PsiCubed2/My_Letter_Notation>)
|
|
675
|
-
|
|
676
|
-
The idea here is to extend the PsiCubed's letter notation to much larger numbers reach level ε0 of FGH or HH. The properties we wish to preserve here are:
|
|
677
|
-
|
|
678
|
-
(1) Any number has a unique standard representation in the system.
|
|
679
|
-
|
|
680
|
-
(2) Given the standard representation of two numbers, one can immediately tell which one is larger without any calculations.
|
|
681
|
-
|
|
682
|
-
## The format of the proposed notation
|
|
683
|
-
|
|
684
|
-
Our final notation will look like this:
|
|
685
|
-
|
|
686
|
-
\[symbol]\[letter]\[number]
|
|
687
|
-
|
|
688
|
-
where \[symbol] can be one of the following: empty,!,@,#,$,%,&,……
|
|
689
|
-
|
|
690
|
-
where \[letter] can be one of the following: E,F,G,H,……,Aa,Ab,Ac,……,Ba,Bb,……,Aaa,……
|
|
691
|
-
|
|
692
|
-
and \[number] can be any positive real number (nonintegers included).
|
|
693
|
-
|
|
694
|
-
## Single letter notation
|
|
695
|
-
|
|
696
|
-
### The First Levels: A Continuous version of Knuth Arrows
|
|
697
|
-
|
|
698
|
-
Let α be a positive real number, β be a positive integer, we'll define (use extended arrow operation):
|
|
699
|
-
|
|
700
|
-
Eα = 10^α = 10{1}α
|
|
701
|
-
|
|
702
|
-
Fα = EEEE...EEE(10^frac(α)) with int(α) E's = 10{2}α
|
|
703
|
-
|
|
704
|
-
Gα = FFFF...FFF(10^frac(α)) with int(α) F's = 10{3}α
|
|
705
|
-
|
|
706
|
-
Hα = GGGG...GGG(10^frac(α)) with int(α) G's = 10{4}α
|
|
707
|
-
|
|
708
|
-
then we'll have I,J,K,... to Z ,each with the same definition as Hα.
|
|
709
|
-
|
|
710
|
-
Note that according to these definitions we have:
|
|
711
|
-
|
|
712
|
-
(1) For α≤1: Eα = Fα = Gα = Hα = ... = Zα = 10^α
|
|
713
|
-
|
|
714
|
-
(2) For any integer β: Eβ = 10{1}β, Fβ = 10{2}β, Gβ = 10{3}β, Hβ = 10{4}β
|
|
715
|
-
|
|
716
|
-
the γ-th letter β represents 10(γ-4 arrows)β = 10{γ-4}β
|
|
717
|
-
|
|
718
|
-
So the above definitions are indeed an extention of Knuth arrows to nonintegers.
|
|
719
|
-
|
|
720
|
-
### Letter-Canonical Forms
|
|
721
|
-
|
|
722
|
-
If α is a number greater than 1 and Γ is a one of the letters E,F,G,H,...,Z then there is a unique number β such that:
|
|
723
|
-
|
|
724
|
-
α = Γβ.
|
|
725
|
-
|
|
726
|
-
And we call "Γβ" the Γ-Canonical Form of the number α.
|
|
727
|
-
|
|
728
|
-
For example, the E-Canonical form of 1000 is E3:
|
|
729
|
-
|
|
730
|
-
E3 = 10^3 = 1000.
|
|
731
|
-
|
|
732
|
-
And the F-Canonical form of 1000 is about F1.47712:
|
|
733
|
-
|
|
734
|
-
F1.47712 = E(10^0.47712) ≈ E3 = 10^3 = 1000.
|
|
735
|
-
|
|
736
|
-
### Binary-Letter-Canonical Forms
|
|
737
|
-
|
|
738
|
-
To recreate ordinary scientific notation, we'll define a binary version of the letter functions like this:
|
|
739
|
-
|
|
740
|
-
Let Γ be one of the letters E,F,G,H,...,Z, β be a nonnegative integer and α be a real number between 1 and 10. Then:
|
|
741
|
-
|
|
742
|
-
αΓβ = Γ(β+log(α))
|
|
743
|
-
|
|
744
|
-
For Example:
|
|
745
|
-
|
|
746
|
-
7E3 = E(3+log(7)) = 10^(3+log(7)) = 7\*10^3 = 7000
|
|
747
|
-
|
|
748
|
-
7F3 = F(3+log(7)) = EEE(10^log(7)) = EEE7 = 10^10^10^7
|
|
749
|
-
|
|
750
|
-
So αEβ is nothing more than ordinary scientific notation.
|
|
751
|
-
|
|
752
|
-
And αFβ is a power tower of β 10's topped by an α.
|
|
753
|
-
|
|
754
|
-
And again, given any specific letter (E,F,G,H,...,Z), ANY number greater than 1 has a unique representation as αΓβ (with 1≤α<10). So we can call this the Binary-Γ-Canonical Form of α.
|
|
755
|
-
|
|
756
|
-
## Multi letter notation
|
|
757
|
-
|
|
758
|
-
### Defining Aa - The First Diagonalization
|
|
759
|
-
|
|
760
|
-
In the previous section we've defined a finite sequence of functions, so we can diagonalize over them:
|
|
761
|
-
|
|
762
|
-
let 10{1}α = Eα, 10{2}α = Fα, 10{3}α = Gα, ..., 10{22}α = Zα.
|
|
763
|
-
|
|
764
|
-
we had: Aaα = 10{α}10, so Aa has ω hyper-operation level.
|
|
765
|
-
|
|
766
|
-
Then, we'll give a definition for non-integer 10{α}10 and amend the definition of Aa:
|
|
767
|
-
|
|
768
|
-
- Aaα = 10{α}10 = 10{int(α)+1}2\*5^frac(α)
|
|
769
|
-
|
|
770
|
-
The seemingly complex expression simply gives us a smooth geometric curve between 2 and 10. This ensures that Aa would be continuous, given the identity 10{β}10 = 10{β+1}2.
|
|
771
|
-
|
|
772
|
-
Then we can define Binary-Letter-Canonical form of Aa: αAaβ = 10{β+1}α = 10{β}10{β}10...{β}10^frac(α) with int(α)10's
|
|
773
|
-
|
|
774
|
-
For example, 1Aa10=10, 2Aa10 = 10{10}10, 2.5Aa10 = 10{10}2.5 = 10{10}10{10}3.162, 3Aa10 = 10{10}10{10}10, Aa10.5 = 10{11}2\*5^0.5 = 10{11}4.472 = 4.472Aa10, 10Aa10 = 10{10}^9 10 = 10{11}10 = 2Aa11
|
|
775
|
-
|
|
776
|
-
### Ab,Ac,Ad,...,Az and their Universal Binary-Letter-Canonical Forms
|
|
777
|
-
|
|
778
|
-
The definitions of Ab,Ac,Ad,...,Az are simple enough:
|
|
779
|
-
|
|
780
|
-
Abα = AaAa...AaAa(10^frac(α)) with int(α) Aa's = 10{ω+1}α
|
|
781
|
-
|
|
782
|
-
Acα = AbAb...AbAb(10^frac(α)) with int(α) Ab's = 10{ω+2}α
|
|
783
|
-
|
|
784
|
-
then we have Ad,Ae,...,Az, each with the same definition as Ab and Ac, and that's it. So A(the β+1-th lowercase letter)α is 10{ω+β}α.
|
|
785
|
-
|
|
786
|
-
Again we have Ab0=Ac0=Ad0=...=Az0=1, Ab1=Ac1=Ad1=...=Az1=10, Aa10=Ab2, Ab10=Ac2, ... and Ab,Ac,Ad,...,Az are all continuous. So any number greater than 1 has a unique Ab to Az Canonical Form.
|
|
787
|
-
|
|
788
|
-
Moreover, since 10{10}10=Aa10=Ab2(2Aa10=1Ab2), we can extend our definition of the Binary-Letter-Canonical form up to Az:
|
|
789
|
-
|
|
790
|
-
(1) Set a threshold number θ (such as 1000, that's 1E3)
|
|
791
|
-
|
|
792
|
-
(2) if the number <θ then we write down the scientific notation (...E...) of this number.
|
|
793
|
-
|
|
794
|
-
(3) Otherwise, we write Γα → 10^frac(α)Γint(α) for letter combinations (E~Z, Ab~Az) or → 2*5^frac(α)Γint(α) for Aa, and 2≤α<θ. If there is more than one possible choice, we choose the letter combination which comes first in order.
|
|
795
|
-
|
|
796
|
-
Examples:
|
|
797
|
-
|
|
798
|
-
10{20}10 = 1X10 = 1Y2 = 2Aa20, so we write it as 1.000X10.
|
|
799
|
-
|
|
800
|
-
10{30}10 = 2Aa30, so we write it as 2.000Aa30.
|
|
801
|
-
|
|
802
|
-
10{ω+1}10 = 1Ab10 = 1Ac2, so we write it as 1.000Ab10.
|
|
803
|
-
|
|
804
|
-
### Defining from Ba to Bz
|
|
805
|
-
|
|
806
|
-
We already know how to do recursion (F,G,H,I,...,Z) and simple diagonalization (Aa) in our continuous system, so we can easily extend our system up to ω\*2 level. In order to track our progress, we'll define:
|
|
807
|
-
|
|
808
|
-
- 10{α}10 = Aaα, 10{ω+β+1}α = 10{ω+β}10{ω+β}...10^frac(α) with int(α) 10{ω+β}'s
|
|
809
|
-
|
|
810
|
-
And define Baα in a way similar to Aaα:
|
|
811
|
-
|
|
812
|
-
Baα = 10{ω+α}10 = 10{ω+int(α)+1}2\*5^frac(α)
|
|
813
|
-
|
|
814
|
-
This gives rise to writing numbers in Ba Canonical form and extend the universal Binary-Letter-Canonical form of Ba: αBaβ = 10{ω+β+1}α = 10{ω+β}10{ω+β}10...{ω+β}10^frac(α) with int(α)10's. Because of 10{ω+β}10 = 10{ω+β+1}2, α in αBaβ has a range of [2,10).
|
|
815
|
-
|
|
816
|
-
Then we can define Bb,Bc,Bd,...,Bz with recursions in a similar way. Bbα = BaBa...BaBa(10^frac(α)) with int(α) Ba's = 10{ω\*2+1}α, and Bcα = BbBb...BbBb(10^frac(α)) with int(α) Bb's = 10{ω\*2+2}α, etc. So B(the β+1-th lowercase letter)α is 10{ω\*2+β}α.
|
|
817
|
-
|
|
818
|
-
### A Supporting Extended Arrow Operation and Aaa
|
|
819
|
-
|
|
820
|
-
We can, of-course, repeat what we did in the previous section as many times as we wish and get the following ω^2-level notation (β,γ ≥ 0 are integers, and α≥0 is real):
|
|
821
|
-
|
|
822
|
-
(i) 10{1}α = 10^α
|
|
823
|
-
|
|
824
|
-
(ii) 10{ω\*β+γ+1}α = 10{ω\*β+γ}10{ω\*β+γ}...10^frac(α) with int(α) 10{ω\*β+γ}'s
|
|
825
|
-
|
|
826
|
-
(iii) 10{ω\*β+α}10 = 10{ω\*β+int(α)+1}2\*5^frac(α)
|
|
827
|
-
|
|
828
|
-
(iv) 10{ω\*(β+1)}α = 10{ω\*β+α}10
|
|
829
|
-
|
|
830
|
-
Note that {ω\*β+γ} is a valid extended arrow operation. Also, in this new notation we can write Baα = 10{ω+α}10, Bbα = 10{ω\*2+1}α,... Bzα = 10{ω\*2+25}α.
|
|
831
|
-
|
|
832
|
-
We can extend to more uppercase letters: Caα = 10{ω\*2+α}10, Cbα = 10{ω\*3+1}α, ..., Zaα = 10{ω\*25+α}10, ..., and finally Zzα = 10{ω\*26+25}α.
|
|
833
|
-
|
|
834
|
-
So we have Qq1.000Qe308 = 10{ω17+16}10{ω17+4}308
|
|
835
|
-
|
|
836
|
-
And with this new supporting notation we can now to define:
|
|
837
|
-
|
|
838
|
-
- Aaaα = 10{ω\*int(α)+10\*frac(α)}10
|
|
839
|
-
|
|
840
|
-
Containing a very neat trick that allows us to do the double-diagonalization with a single number: Aaa1.5 = 10{ω+5}10, Aaa2.5 = 10{ω\*2+5}10
|
|
841
|
-
|
|
842
|
-
At any rate, it isn't too difficult to see that Aaa behaves "nicely" and allows us to speak of Aaa Canonical Forms of any number. Aaa1=Aa10, Aaa2=Ba10, ..., Aaa26=Za10 take the foundamental sequences.
|
|
843
|
-
|
|
844
|
-
This also enables us to write the unversal Binary-Letter-Canonical form of any number up to Aaa: αAaaβ = 10{ω^2}(log5(α/2)+β). Since 10{ω^2}1=10{ω}10, 10{ω^2}2=10{ω\*2}10, α in αAaaβ has a range of [2,10).
|
|
845
|
-
|
|
846
|
-
## Symbol and letter notation
|
|
847
|
-
|
|
848
|
-
### Notations with more than three letters, and !Aa
|
|
849
|
-
|
|
850
|
-
Extended arrow operations can be easily extended, like so:
|
|
851
|
-
|
|
852
|
-
(i) 10{1}α = 10^α
|
|
853
|
-
|
|
854
|
-
(ii) 10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν+1}α = 10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν}10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν}...10^frac(α) with int(α) 10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν}'s
|
|
855
|
-
|
|
856
|
-
(iii) 10{...+ω^3\*β+ω^2\*γ+ω\*δ+α}10 = 10{...+ω^3\*β+ω^2\*γ+ω\*δ+int(α+1)}2\*5^frac(α)
|
|
857
|
-
|
|
858
|
-
(iv) 10{(...+ω^3\*β+ω^2\*γ+ω\*δ+μ+1)\*ω^κ}α = 10{(...+ω^4\*β+ω^3\*γ+ω^2\*δ+ω\*μ+α)\*ω^(κ-1)}10
|
|
859
|
-
|
|
860
|
-
(v) 10{(...+ω^3\*β+ω^2\*γ+ω\*δ+α)\*ω^κ}10 = 10{(...+ω^4\*β+ω^3\*γ+ω^2\*δ+ω\*int(α)+frac(α)\*10)\*ω^κ}10
|
|
861
|
-
|
|
862
|
-
The first 4 rules are a simple and direct extention of the {ω\*β+γ} notation.
|
|
863
|
-
|
|
864
|
-
Rule (v) is an interesting one, though. It basically tells us that if we have an ordinal which ends with ω^n\*0 terms, then the digits of the fractional part of α are to be distributed among the terms. For example:
|
|
865
|
-
|
|
866
|
-
- 10{ω^6\*114+ω^5\*514+ω^4\*1.9198}10 = 10{ω^6\*114+ω^5\*514+ω^4+ω^3\*9+ω^2+ω\*9+8}10.
|
|
867
|
-
|
|
868
|
-
Now, all that is left to do is to define !Aa, which has ω^ω level.
|
|
869
|
-
|
|
870
|
-
- !Aaα ≡ A(a×⌊α⌋)(α) — the letter token carrying ⌊α⌋ lowercase a's applied at argument α (notation-semantics decision 1B). For a non-integer α this is the continuous extension inside each unit interval (e.g. !Aa1.5 = Aa1.5, !Aa2.5 = Aaa2.5).
|
|
871
|
-
- For an INTEGER α = n the "!" adds one ω^ to the level, so !Aan = 10{ω^n}10 evaluated as the full rule-3 cascade: !Aa1 = 10{ω}10 = 10{10}10 = Aa10, !Aa2 = 10{ω^2}10, !Aa3 = 10{ω^3}10. (This is NOT the token application A(a×n)(n) — Aaaa3 ≠ !Aa3.) The stored form is the base [10] plus the cascade's ordinal rows; the higher symbols keep the very same array one layer up: @Aa3 (layer 1) = 10{ω^(ω^3)}10, #Aa3 (layer 2) = 10{ω^(ω^(ω^3))}10.
|
|
872
|
-
- The formula !Aaα = 10{ω^int(α)\*frac(α)}10 is only the rule-(v) digit-distribution shorthand: read literally it degenerates at integers (int(1)·frac(1) = 0 gives 10{0}10 = 100), so it must not be used as an executable definition.
|
|
873
|
-
|
|
874
|
-
Then we have !Aa1 = Aa10 (the diagonal reading above); the earlier claim "!Aa2 = Aaa10" does not hold — !Aa2 = 10{ω^2}10 while Aaa10 is the compact ω²-marker. Just like the previous letters, any number can be written as !Aaα. Here, it is actually the binary form of !αAaβ = !Aa(β+log₅(α/2)) which has the most intuitive meaning:
|
|
875
|
-
|
|
876
|
-
In terms of the extended arrow operation, β tells us ω^β is in the ordinal and the digits of α tell us its coefficient and what residue ordinals are. Actually, !αAaβ has a more ω^ layer compare to αAaβ in ordinal level. For example, !2.0000Aa4 = !Aa4 = 10{ω^4}10 and 2.0000Aa4 = 10{4}10 (α = 2 contributes log₅(2/2) = 0, so the two spellings coincide)
|
|
877
|
-
|
|
878
|
-
And in terms of ordinals, β gives us the maximum power of ω and the digits of α give us the coefficents of the various powers of ω, these neat relations are also true for β=1 and α≥2.
|
|
879
|
-
|
|
880
|
-
### Higher dimensional arrays and @Aa
|
|
881
|
-
|
|
882
|
-
With the definition of the extended arrow operation and the symbol !, one can easily define new operations up to ω^ω^ω level.
|
|
883
|
-
|
|
884
|
-
By adding ! before a letter notation, it adds a ω^ layer (likes the same ordinal but changes from HH to FGH). Aa represents ω level, so !Aa represents ω^ω level. Then we can define !Ab (ω^(ω+1)), !Ac, !Ad, ..., !Az with the same meaning as !Aa, and !Ba (ω^(ω\*2)), !Bb, !Bc, ..., !Bz, !Aaa, etc. Comparing these with the previous letters, we can see that notations with ! symbol have a more ω^ than those without ! symbol. Fractional number of rows, columns, etc.. are defined in the same way.
|
|
885
|
-
|
|
886
|
-
Now, all that is left to do is to define @Aa, which has ω^ω^ω level.
|
|
887
|
-
|
|
888
|
-
- @Aaα = 10{ω^(ω^int(α)\*frac(α))}10
|
|
889
|
-
|
|
890
|
-
### Nested arrays and more symbols
|
|
891
|
-
|
|
892
|
-
The Definiton of more symbols is similar to the definition of @Aa.
|
|
893
|
-
|
|
894
|
-
- \#Aaα \~ 10{ω^ω^(ω^int(α)\*frac(α))}10
|
|
895
|
-
|
|
896
|
-
- \$Aaα \~ 10{ω^ω^ω^(ω^int(α)\*frac(α))}10
|
|
897
|
-
|
|
898
|
-
Then we can define (the β-th symbol or symbol combination)Aaα = 10{ω^ω^...^(ω^int(α)\*frac(α))(β ω's)}10
|
|
899
|
-
|
|
900
|
-
### Definition of the final letter: ε
|
|
901
|
-
|
|
902
|
-
ε represents exponent tower layers of ω.
|
|
903
|
-
|
|
904
|
-
- αεβ \~ 10{ω^ω^...^(ω^int(α)\*frac(α))(β ω's)}10
|
|
905
|
-
|
|
906
|
-
### Using dlsdl's letter notation, the biggest number we can define in Metanum is about ε9.007E15
|
|
907
|
-
|
|
908
|
-
# format-metanum
|
|
909
|
-
|
|
910
|
-
## Description
|
|
911
|
-
|
|
912
|
-
Implementation of dlsdl's letter notation for large number library, currently metanum.js
|
|
913
|
-
|
|
914
|
-
the letter notations follow **diagonal letters**: names ending in `a` (`Aa` = ω, `Ba` = ω·2, `Aaa` = ω², …) carry the mantissa `α = 2·5^f ∈ [2,10)`: `10{ω*3}100=10{ω*2+100}10` → `2.000Ca100`, `10{ω^2}100=10{ω*100}10` → `2.000Aaa100`. And mantissa `α∈[1,10)` for the other letters: `10{ω*3+1}100=10{ω*3}^99 10` → `1.000Cb100`
|
|
915
|
-
|
|
916
|
-
## format options
|
|
917
|
-
|
|
918
|
-
```javascript
|
|
919
|
-
smallNotationUseE // 1. for small value notations, true then use αE-β,false then use number⁻¹
|
|
920
|
-
smallNotationThreshold // 2. =n then value < 10^-n uses small notation
|
|
921
|
-
decimalPlaces // 3. for normal notations, =0 is 1,=1 is 1.0,=2 is 1.00 etc.
|
|
922
|
-
decimalThreshold // 4. =n then value >= 10^n only show integer part
|
|
923
|
-
useCommas // 5. whether to show commas in normal numbers (true/false)
|
|
924
|
-
sciThreshold // 6. =n then value >= 10^n use scientific notation, same for β in αEβ
|
|
925
|
-
sciSignificantDigits // 7. =n then α has n decimal places in αEβ
|
|
926
|
-
sciDecimalThreshold // 8. =n then β >= 10^n in αEβ only show integer part of α
|
|
927
|
-
singleLetterDigits // 9. α's decimal places in αFβ,αGβ...αZβ
|
|
928
|
-
repeatLetterThreshold // 10. =n then n repeated single letters use next letter notation
|
|
929
|
-
multiLetterDigits // 11. α's decimal places in αAaβ,αAbβ...αAaaβ and above
|
|
930
|
-
multiLetterRepeatThreshold// 12. =n then n repeated multi letter combinations use next letter notation
|
|
931
|
-
multiLetterLimit // 13. =n then length of multi letter combinations does not exceed n, exceed then switch to next notation (length of Aa~Zz is 2, Aaa~Zzz is 3, Aaaa~Zzzz is 4...)
|
|
932
|
-
epsilonSignificantDigits // 14. α's decimal places in αεβ
|
|
933
|
-
```
|
|
934
|
-
|
|
935
|
-
## Cases
|
|
936
|
-
|
|
937
|
-
- 0 ~ 10^-smallNotationThreshold: E- format(αE-β=α×10^-β; E-αEβ=10^-(α×10^β); E-……=10^-……)(smallNotationUseE true) or ……⁻¹(reciprocal)
|
|
938
|
-
- 10^-smallNotationThreshold ~ 10^decimalThreshold: decimal format (decimalPlaces digits)
|
|
939
|
-
- 10^decimalThreshold ~ 10^sciThreshold: comma format(useCommas true) or integer format
|
|
940
|
-
- 10^sciThreshold ~ 10^(10^sciThreshold): exponential as well as αEβ format
|
|
941
|
-
- 10^(10^sciThreshold) ~ 10^^(repeatLetterThreshold+1): n E's αEβformat(EαEβ, EEαEβ, EEEαEβ……)
|
|
942
|
-
- 10^^(repeatLetterThreshold+1) ~ 10^^(10^sciThreshold): αFβ format
|
|
943
|
-
- 10^^(10^sciThreshold) ~ 10^^(10^^(repeatLetterThreshold+1)): FαEβ, FEαEβ, FEEαEβ…… format
|
|
944
|
-
- 10^^(10^^(repeatLetterThreshold+1)) ~ 10^^^(repeatLetterThreshold+1): FαFβ, FFαFβ, FFFαFβ…… format
|
|
945
|
-
- 10^^^(repeatLetterThreshold+1) ~ 10^^^(10^sciThreshold): αGβ format
|
|
946
|
-
- 10^^^(10^sciThreshold) ~ 10^^^(10^^(repeatLetterThreshold+1)): GαEβ, GEαEβ,…… format
|
|
947
|
-
- 10^^^(10^^(repeatLetterThreshold+1)) ~ 10{4}(repeatLetterThreshold+1): GαGβ, GGαGβ,…… format
|
|
948
|
-
- 10{4}(repeatLetterThreshold+1) ~ 10{5}(repeatLetterThreshold+1): αHβ, HαEβ, HEαEβ, HαFβ, HFαFβ, HαGβ, HGαGβ, HαHβ, HHαHβ,…… format
|
|
949
|
-
|
|
950
|
-
…………
|
|
951
|
-
|
|
952
|
-
- 10{22}(repeatLetterThreshold+1) ~ 10{23}(repeatLetterThreshold+1): αZβ format; ZαEβ, ZEαEβ, ……, ZαZβ, ZZαZβ,…… format
|
|
953
|
-
- 10{23}(repeatLetterThreshold+1) ~ 10{10^sciThreshold}10(=10{ω}(10^sciThreshold)): αAaβ format
|
|
954
|
-
- 10{ω}(10^sciThreshold) ~ 10{ω+1}(multiLetterRepeatThreshold+1): AaαEβ, ……, AaαAaβ, AaAaαAaβ…… format
|
|
955
|
-
- 10{ω+1}(multiLetterRepeatThreshold+1) ~ 10{ω+1}(10^sciThreshold): αAbβ format
|
|
956
|
-
- 10{ω+1}(10^sciThreshold) ~ 10{ω+2}(multiLetterRepeatThreshold+1): AbαEβ, ……, AbαAbβ, AbAbαAbβ…… format
|
|
957
|
-
- 10{ω+2}(multiLetterRepeatThreshold+1) ~ 10{ω+2}(10^sciThreshold): αAcβ format
|
|
958
|
-
|
|
959
|
-
…………
|
|
960
|
-
|
|
961
|
-
- 10{ω+25}(multiLetterRepeatThreshold+1) ~ 10{ω+25}(10^sciThreshold): αAzβ format
|
|
962
|
-
- 10{ω+25}(10^sciThreshold) ~ 10{ω+26}(multiLetterRepeatThreshold+1): AzαEβ to AzαAzβ, AzAzαAzβ…… format
|
|
963
|
-
- 10{ω+26}(multiLetterRepeatThreshold+1) ~ 10{ω+10^sciThreshold}10(=10{ω×2}(10^sciThreshold)): αBaβ format
|
|
964
|
-
- 10{ω×2}(10^sciThreshold) ~ 10{ω×2}(multiLetterRepeatThreshold+1): BaαEβ to BaαBaβ, BaBaαBaβ…… format
|
|
965
|
-
|
|
966
|
-
…………
|
|
967
|
-
|
|
968
|
-
- 10{ω×2+26}(multiLetterRepeatThreshold+1) ~ 10{ω×2+10^sciThreshold}10(=10{ω×3}(10^sciThreshold)): αCaβ format
|
|
969
|
-
- 10{ω×3}(10^sciThreshold) ~ 10{ω×3}(multiLetterRepeatThreshold+1): CaαEβ to CaαCaβ, CaCaαCaβ…… format
|
|
970
|
-
|
|
971
|
-
…………
|
|
972
|
-
|
|
973
|
-
- 10{ω×26+25}(multiLetterRepeatThreshold+1) ~ 10{ω×26+25}(10^sciThreshold): αZzβ format
|
|
974
|
-
- 10{ω×26+25}(10^sciThreshold) ~ 10{ω×26+26}(multiLetterRepeatThreshold+1): ZzαEβ to ZzαZzβ, ZzZzαZzβ…… format
|
|
975
|
-
- 10{ω×26+26}(multiLetterRepeatThreshold+1) ~ 10{ω×(10^sciThreshold)}10(=10{ω^2}(10^sciThreshold)): αAaaβ format
|
|
976
|
-
- 10{ω^2}(10^sciThreshold) ~ 10{ω^2}(multiLetterRepeatThreshold+1): AaaαEβ to AaaαAaaβ, AaaAaaαAaaβ…… format
|
|
977
|
-
|
|
978
|
-
…………
|
|
979
|
-
|
|
980
|
-
- 10{……+ω^3×26+ω^2×26+ω×26+26}10 ~ 10{ω^ω}(10^sciThreshold): !αAaβ format
|
|
981
|
-
- 10{ω^ω}(10^sciThreshold) ~ 10{ω^(……ω^3×26+ω^2×26+ω×26+26)}10: !AaαEβ, !αAbβ, !αAaaβ…… format
|
|
982
|
-
- 10{ω^(……+ω^3×26+ω^2×26+ω×26+26)}10 ~ 10{ω^ω^ω}(10^sciThreshold): @αAaβ format
|
|
983
|
-
- 10{ω^ω^ω}(10^sciThreshold) ~ 10{ω^ω^(……ω^3×26+ω^2×26+ω×26+26)}10: @AaαEβ, @αAbβ, @αAaaβ…… format
|
|
984
|
-
- 10{ω^ω^(……+ω^3×26+ω^2×26+ω×26+26)}10 ~ 10{ω^ω^ω^ω}(10^sciThreshold): #αAaβ format
|
|
985
|
-
- 10{ω^ω^ω^ω}(10^sciThreshold) ~ 10{ω^ω^ω^(……ω^3×26+ω^2×26+ω×26+26)}10: #AaαEβ, #αAbβ, #αAaaβ…… format
|
|
986
|
-
|
|
987
|
-
…………
|
|
988
|
-
|
|
989
|
-
- 10{ω^ω^……^ω}10 ~ 10{ω^ω^…(10^sciThreshold ω^'s)…^ω}10: αεβformat
|
|
990
|
-
- 10{ω^ω^…(10^sciThreshold ω^'s)…^ω}10 ~ limit of metanum.js: εαEβformat
|
|
991
|
-
|
|
992
|
-
### format-metanum rules
|
|
993
|
-
|
|
994
|
-
- **Γ-canonical α/β (bisect law)**: the true α and β of a value v at letter Γ are recovered by bisecting 10{L}x = v on the engine's own smooth arrow curve (Γ = E,F,G,... single letters, L = level). α = 10^frac(x), β = floor(x), n operations of level L applied to a Γ^{L+1}-structured value collapse to ONE Γ^{L+1} with arg + n (e.g. F⁴(G(1.3796)) = G(5.3796)):
|
|
995
|
-
`format(arrow(3,4.1,3))` → `G1.161G897`,
|
|
996
|
-
`format(arrow(3,4.3,3))` → `1.285H8`,
|
|
997
|
-
`format(hardy(4166))` → `2.397G5`.
|
|
998
|
-
- **α appears at most once**, attached to the innermost value: `format(GE12)` → `G1.000E12`; hardy(1120) → `F4.398E13`. Once the innermost β reaches 10^sciThreshold the letter goes bare and β carries its own sci form.
|
|
999
|
-
- **At most 2 finite letter types** may appear in a display's hyper-op chain (VαEβ → VEαEβ → VαFβ → … → VαVβ, never another like VFαEβ), (AaαEβ → AaαFβ → … → AaαZβ → AaαAaβ, never another like AaFαEβ). A cascade that would spell more than two letter types spells only its top two levels and compresses the rest into the second letter's binary form. "bottom Γ repeation": 3{9}3 → `L2.376K2`, 3{10}3 → `M2.376L2`, 4{9}4 → `LLK3.550K3`, 5{9}5 → `LLLKK4.669K4`; repeatLetterThreshold+1 top repeats carry to the next letter instead (6{9}6 → `5.760M5`), and levels 22→21, 23→22 stay two-letter (`Y2.376X2`, `Z2.376Y2`), level ≥ 23 cascades display as the αΓβ polarize diagonal.
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1
|
+
# MetaNum
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/metanum)
|
|
4
|
+
|
|
5
|
+
- MetaNum v2.1.2 by dlsdl
|
|
6
|
+
|
|
7
|
+
A huge number library holding up to X↑↑X&9e15.
|
|
8
|
+
|
|
9
|
+
This reaches level f<sub>ε₀</sub>, which is the limit of well-defined expressions in BEAF, hence the name.
|
|
10
|
+
|
|
11
|
+
MetaNum provides a robust implementation of hierarchical number representation based on 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
|
+
|
|
13
|
+
- **sign**: 1 (positive), -1 (negative), 2 (reciprocal positive), -2 (reciprocal negative)
|
|
14
|
+
- **array**: 2-dimensional array `[[r0, r1, r2, ...,rn], [acount, a1, a2, ...,ax], [bcount, b1, b2, ...,by], ...,[mcount, m1, m2, ...,mz]]` where the first row holds the base value and finite hyper-operation exponents and subsequent rows hold ordinal terms, 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
|
+
Using extended arrow operations(see #Mathematical Background), a metanum number can be represented as \[none(sign=1)|-(sign=-1)|1/(sign=2)|-1/(sign=-2)] \[mcount(10{ω^(z-1)\*mz+...+ω^2\*m3+ω\*m2+m1})'s ... bcount(10{ω^(y-1)\*by+...+ω^2\*b3+ω\*b2+b1})'s acount(10{ω^(x-1)\*ax+...+ω^2\*a3+ω\*a2+a1})'s rn(10{n})'s ... r3(10{3})'s r2(10{2})'s r1(10{1})'s r0 (layer=0)|10{ω^ω^...(layer-1 ω^'s) (ω^(ω^(z-1)\*mz+...+ω^2\*m3+ω\*m2+m1)\*mcount+...+ω^(ω^(y-1)\*by+...+ω^2\*b3+ω\*b2+b1)\*bcount+ω^(ω^(x-1)\*ax+...+ω^2\*a3+ω\*a2+a1)\*acount+ω^n\*rn+...+ω^3\*r3+ω^2\*r2+ω\*r1+r0)}10 (layer>=1)]
|
|
18
|
+
|
|
19
|
+
In Fast Growing Hierarchy, a metanum number is nearly `f_ω^ω^…(layer-1 ω^'s)…(ω^(ω^(z-1)*mz+…+ω^2*m3+ω^*m2+m1)*mcount+…+ω^(ω^(y-1)*by+…+ω^2*b3+ω*b2+b1)*bcount+ω^(ω^(x-1)*ax+…+ω^2*a3+ω*a2+a1)*acount+ω^n*rn+…+ω^3*r3+ω^2*r2+ω*r1+r0)[10](layer>=1)` or `f^mcount_(ω^(z-1)*mz+…+ω^2*m3+ω^*m2+m1)[…[f^bcount_(ω^(y-1)*by+…+ω^2*b3+ω^*b2+b1)[f^acount_(ω^(x-1)*ax+…+…ω^2*a3+ω*a2+a1)[rn 10{n}'s … r3 10^^^'s r2 10^^'s r1 10^'s r0]]…](layer=0)`
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install metanum
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Creating Instances
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
// From a plain number
|
|
31
|
+
const a = new MetaNum(428571);
|
|
32
|
+
const b = MetaNum.fromNumber(-2.71828);
|
|
33
|
+
|
|
34
|
+
// From a string (supports scientific notation, hyper-operations, letter notation, brackets, etc.)
|
|
35
|
+
const c = new MetaNum("1.797e308");
|
|
36
|
+
const d = MetaNum.fromString("1F5"); // tetration: 10^^5
|
|
37
|
+
const e = MetaNum.fromString("E100#2"); // Hyper-E: 10^10^100 (googolplex)
|
|
38
|
+
const f = MetaNum.fromString("GF^2 E^3 123"); // letter notation
|
|
39
|
+
const g = MetaNum.fromString("Aa100"); // letter notation
|
|
40
|
+
const h = MetaNum.fromString("[[10], [1, 3]]"); // bracket notation
|
|
41
|
+
|
|
42
|
+
// From an array
|
|
43
|
+
const i = MetaNum.fromArray([2.71828, 1, 2]); // array=[[2.71828, 1, 2]], =10^^10^^10^2.71828
|
|
44
|
+
const j = MetaNum.fromArray([10], 1, 1); // layer 1
|
|
45
|
+
|
|
46
|
+
// From an object / JSON
|
|
47
|
+
const k = MetaNum.fromJSON('{"sign":1,"array":[[428571]],"layer":0}');
|
|
48
|
+
const l = MetaNum.fromObject({ sign: 1, array: [[1, 2]], layer: 0 });
|
|
49
|
+
|
|
50
|
+
// From BigInt
|
|
51
|
+
const m = MetaNum.fromBigInt(10n ** 100n);
|
|
52
|
+
|
|
53
|
+
// From Hyper-E notation
|
|
54
|
+
const n = MetaNum.fromHyperE("EE100");
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Constants
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
MetaNum.MAX_SAFE_INTEGER // 9007199254740991
|
|
61
|
+
MetaNum.E // log10(MSI)=15.954589770191
|
|
62
|
+
MetaNum.POSITIVE_INFINITY // Infinity
|
|
63
|
+
MetaNum.NEGATIVE_INFINITY // -Infinity
|
|
64
|
+
MetaNum.GRAHAMS_NUMBER // Graham's number (approximation)
|
|
65
|
+
MetaNum.TRITRI // 3↑↑↑3 = 3^^^3
|
|
66
|
+
MetaNum.QqQe308 // QqQe308 (for incremental games)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Basic Usage
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
// Arithmetic
|
|
73
|
+
const sum = MetaNum.add(15, 27); // 42 (static)
|
|
74
|
+
const diff = new MetaNum(27).sub(15); // 12 (instance)
|
|
75
|
+
const product = new MetaNum(15).mul(27); // 405
|
|
76
|
+
const quotient = new MetaNum(27).div(15); // 1.8
|
|
77
|
+
|
|
78
|
+
// Power & roots
|
|
79
|
+
new MetaNum(2).pow(10); // 1024
|
|
80
|
+
new MetaNum(100).sqrt(); // 10
|
|
81
|
+
new MetaNum(27).cbrt(); // 3
|
|
82
|
+
new MetaNum(8).root(3); // 2
|
|
83
|
+
new MetaNum(10).exp(); // e^10
|
|
84
|
+
|
|
85
|
+
// Logarithms
|
|
86
|
+
new MetaNum(100).log10(); // 2
|
|
87
|
+
new MetaNum(8).log(2); // 3
|
|
88
|
+
new MetaNum(Math.E).ln(); // 1
|
|
89
|
+
|
|
90
|
+
// Comparison
|
|
91
|
+
const x = new MetaNum(10), y = new MetaNum(20);
|
|
92
|
+
x.lt(y); // true
|
|
93
|
+
x.gt(y); // false
|
|
94
|
+
x.eq(y); // false
|
|
95
|
+
x.lte(y); // true
|
|
96
|
+
x.gte(y); // false
|
|
97
|
+
x.neq(y); // true
|
|
98
|
+
x.min(y); // 10
|
|
99
|
+
x.max(y); // 20
|
|
100
|
+
|
|
101
|
+
// Comparison with tolerance
|
|
102
|
+
x.eq_tolerance(new MetaNum(10.0001), 1e-3); // true
|
|
103
|
+
x.cmp_tolerance(y, 1e-7); // -1
|
|
104
|
+
|
|
105
|
+
// Sign checks
|
|
106
|
+
x.ispos(); // true
|
|
107
|
+
x.isneg(); // false
|
|
108
|
+
x.isNaN(); // false
|
|
109
|
+
x.isFinite(); // true
|
|
110
|
+
x.isint(); // true
|
|
111
|
+
|
|
112
|
+
// Rounding
|
|
113
|
+
new MetaNum(3.7).floor(); // 3
|
|
114
|
+
new MetaNum(3.2).ceil(); // 4
|
|
115
|
+
new MetaNum(3.5).round(); // 4
|
|
116
|
+
|
|
117
|
+
// Reciprocal & absolute
|
|
118
|
+
new MetaNum(4).rec(); // 0.25
|
|
119
|
+
new MetaNum(-5).abs(); // 5
|
|
120
|
+
new MetaNum(5).neg(); // -5
|
|
121
|
+
|
|
122
|
+
// Factorial & Gamma
|
|
123
|
+
new MetaNum(5).fact(); // 120
|
|
124
|
+
new MetaNum(0.5).gamma(); // Γ(0.5) = √π
|
|
125
|
+
|
|
126
|
+
// Modulo
|
|
127
|
+
new MetaNum(10).mod(3); // 1
|
|
128
|
+
|
|
129
|
+
// Lambert W function
|
|
130
|
+
new MetaNum(1).lambertw(); // Ω ≈ 0.5671
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Hyper-Operations (Tetration & Beyond)
|
|
134
|
+
|
|
135
|
+
```javascript
|
|
136
|
+
// Tetration: a^^b
|
|
137
|
+
new MetaNum(2).tetr(3); // 2^^3 = 2^2^2 = 16
|
|
138
|
+
new MetaNum(2).tetr(4); // 2^^4 = 65536
|
|
139
|
+
MetaNum.tetr(2, 5); // 2^^5
|
|
140
|
+
|
|
141
|
+
// With payload (offset)
|
|
142
|
+
new MetaNum(10).tetr(2, new MetaNum(5)); // 10^^2 with payload 5
|
|
143
|
+
|
|
144
|
+
// Pentation: a^^^b
|
|
145
|
+
new MetaNum(2).pent(3); // 2^^^3
|
|
146
|
+
|
|
147
|
+
// General arrow notation: a↑^n b
|
|
148
|
+
new MetaNum(2).arrow(3)(4); // 2↑↑↑4 (pentation)
|
|
149
|
+
MetaNum.arrow(3, 4, 3); // 3↑↑↑↑3 = g_1
|
|
150
|
+
|
|
151
|
+
// Chain notation
|
|
152
|
+
new MetaNum(2).chain(4, 3); // 2→4→3
|
|
153
|
+
|
|
154
|
+
// Aperiation: a↑^a a
|
|
155
|
+
new MetaNum(2).aper(3); // 2↑↑↑2 = 4
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Super-logarithm & Super-root
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
// Super-logarithm (inverse of tetration)
|
|
162
|
+
new MetaNum(16).slog(2); // slog_2(16) = 3
|
|
163
|
+
new MetaNum(65536).slog(); // slog_10(65536) ≈ 2
|
|
164
|
+
|
|
165
|
+
// Super-square-root
|
|
166
|
+
new MetaNum(27).ssrt(); // ssqrt(27)
|
|
167
|
+
|
|
168
|
+
// Linear super-root
|
|
169
|
+
new MetaNum(100).linear_sroot(3); // ³ss̅r̅t̅(100)
|
|
170
|
+
|
|
171
|
+
// Layer arithmetic
|
|
172
|
+
new MetaNum(10).layeradd(3); // add 3 layers of exponentiation
|
|
173
|
+
new MetaNum(10).layeradd10(3); // 10^^3 (explicit base 10)
|
|
174
|
+
|
|
175
|
+
// General hyperoperation inverses: if a{b}c = d then d.hyper_log(a)(b) = c and d.hyper_root(c)(b) = a
|
|
176
|
+
MetaNum(14).hyper_log(2)(0); // 2*7 = 14 → 7
|
|
177
|
+
MetaNum(100000).hyper_log(10)(1); // 10^5 → 5
|
|
178
|
+
MetaNum(65536).hyper_log(2)(2); // 2↑↑4 → 4 (slog)
|
|
179
|
+
MetaNum(65536).hyper_root(4)(2); // 2↑↑4 → 2 (base recovery)
|
|
180
|
+
MetaNum(10).arrow(3)(3).hyper_root(3)(3); // 10↑↑↑3 → 10
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Hyper-Operations up to ε₀
|
|
184
|
+
|
|
185
|
+
These functions represent iterated diagonalizations at increasing ordinal levels from ω to ε₀:
|
|
186
|
+
|
|
187
|
+
```javascript
|
|
188
|
+
const x = new MetaNum(10);
|
|
189
|
+
|
|
190
|
+
// Level ω: diagonalize ω*y (→ a↑^a a)
|
|
191
|
+
x.aperiote(3); // aper(3) = h10
|
|
192
|
+
|
|
193
|
+
// Level ω+1: iterate aperiote
|
|
194
|
+
x.expande(3); // expa(3) = h11
|
|
195
|
+
|
|
196
|
+
// Level ω+2: iterate expande
|
|
197
|
+
x.multiexpande(3); // muea(3) = h12
|
|
198
|
+
|
|
199
|
+
// Level ω+3: iterate multiexpande
|
|
200
|
+
x.powerexpande(3); // poea(3) = h13
|
|
201
|
+
|
|
202
|
+
// Level ω*2: diagonalize ω+y
|
|
203
|
+
x.aperioexpande(3); // apea(3) = h20
|
|
204
|
+
|
|
205
|
+
// Level ω*2+1: iterate aperioexpande
|
|
206
|
+
x.explode(3); // expl(3) = h21
|
|
207
|
+
|
|
208
|
+
// Level ω*2+2: iterate explode
|
|
209
|
+
x.multiexplode(3); // muel(3) = h22
|
|
210
|
+
|
|
211
|
+
// Level ω*3: diagonalize ω*2+y
|
|
212
|
+
x.aperioexplode(3); // apel(3) = h30
|
|
213
|
+
|
|
214
|
+
// Level ω*3+1: iterate aperioexplode
|
|
215
|
+
x.detonate(3); // deto(3) = h31
|
|
216
|
+
|
|
217
|
+
// Level ω*4: diagonalize ω*3+y
|
|
218
|
+
x.aperiodetonate(3); // apdt(3) = h40
|
|
219
|
+
|
|
220
|
+
// Level ω^2: diagonalize ω*y
|
|
221
|
+
x.aperionate(3); // apeo(3) = h100
|
|
222
|
+
|
|
223
|
+
// Level ω^2+1: iterate aperionate
|
|
224
|
+
x.megote(3); // mego(3) = h101
|
|
225
|
+
|
|
226
|
+
// Level ω^2+2: iterate megote
|
|
227
|
+
x.multimegote(3); // mume(3) = h102
|
|
228
|
+
|
|
229
|
+
// Level ω^2+ω: diagonalize ω^2+y
|
|
230
|
+
x.aperimegote(3); // apmg(3) = h110
|
|
231
|
+
|
|
232
|
+
// Level ω^2+ω+1: iterate aperimegote
|
|
233
|
+
x.megoexpande(3); // mgea(3) = h111
|
|
234
|
+
|
|
235
|
+
// Level ω^2+ω*2: diagonalize ω^2+ω+y
|
|
236
|
+
x.aperimegoexpande(3); // apme(3) = h120
|
|
237
|
+
|
|
238
|
+
// Level ω^2*2: diagonalize ω^2+ω*y
|
|
239
|
+
x.megoaperionate(3); // mgao(3) = h200
|
|
240
|
+
|
|
241
|
+
// Level ω^2*2+1: iterate megoaperionate
|
|
242
|
+
x.gigote(3); // gigo(3) = h201
|
|
243
|
+
|
|
244
|
+
// Level ω^2*2+ω: diagonalize ω^2*2+y
|
|
245
|
+
x.aperigigote(3); // apgg(3) = h210
|
|
246
|
+
|
|
247
|
+
// Level ω^2*3: diagonalize ω^2*2+ω*y
|
|
248
|
+
x.gigoaperionate(3); // ggap(3) = h300
|
|
249
|
+
|
|
250
|
+
// Level ω^3: diagonalize ω^2*y
|
|
251
|
+
x.aperiatote(3); // apat(3) = h1000
|
|
252
|
+
|
|
253
|
+
// Level ω^3+1: iterate aperiatote
|
|
254
|
+
x.powiainate(3); // pwan(3) = h1001
|
|
255
|
+
|
|
256
|
+
// Level ω^3+ω: diagonalize ω^3+y
|
|
257
|
+
x.expandainate(3); // epan(3) = h1010
|
|
258
|
+
|
|
259
|
+
// Level ω^3+ω^2: diagonalize ω^3+ω*y
|
|
260
|
+
x.megodainate(3); // mgan(3) = h1100
|
|
261
|
+
|
|
262
|
+
// Level ω^3*2: diagonalize ω^3+ω^2*y
|
|
263
|
+
x.powiairate(3); // pwar(3) = h2000
|
|
264
|
+
|
|
265
|
+
// Level ω^4: diagonalize ω^3*y
|
|
266
|
+
x.aperioguate(3); // apgu(3) = h10000
|
|
267
|
+
|
|
268
|
+
// Level ω^ω: diagonalize ω^x (layer 1 transition)
|
|
269
|
+
x.iterate(3); // iter(3) = hww
|
|
270
|
+
|
|
271
|
+
// Level ω^ω+1: iterate ω^ω level operations
|
|
272
|
+
x.itermult(3); // itmu(3) = hw01
|
|
273
|
+
|
|
274
|
+
// Level ω^ω*2: (ω^ω)*2 = ω^ω + ω^base
|
|
275
|
+
x.cuboiter(3); // cube(3) = hwx2
|
|
276
|
+
|
|
277
|
+
// Level ω^(ω+1): ω^(ω+1) = ω^ω*ω → ω^(ω*y)
|
|
278
|
+
x.expoiter(3); // expo(3) = hwa1
|
|
279
|
+
|
|
280
|
+
// Level ω^(ω*2): ω^(ω*2) = ω^(ω+base)
|
|
281
|
+
x.trioterate(3); // tria(3) = hwm2
|
|
282
|
+
|
|
283
|
+
// Level ω^(ω^2): diagonalize ω^(ω*y)
|
|
284
|
+
x.trixxate(3); // trix(3) = hwp2
|
|
285
|
+
|
|
286
|
+
// Level ω^(ω^ω): diagonalize ω^(ω^y) (layer 2)
|
|
287
|
+
x.aperixxate(3); // apix(3) = hwpw
|
|
288
|
+
|
|
289
|
+
// Level ε₀ = ω↑↑ω: diagonalize ω↑↑y (layer 3+)
|
|
290
|
+
x.epsilonate(3); // epsl(3) = hepsl
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Inverse Operations
|
|
294
|
+
|
|
295
|
+
Each expansion operation has a corresponding inverse for decrementing ordinal structure:
|
|
296
|
+
|
|
297
|
+
```javascript
|
|
298
|
+
x.i_aper(z) // i10 = inverse of aperiote
|
|
299
|
+
x.i_expa(z) // i11 = inverse of expande
|
|
300
|
+
x.i_muea(z) // i12 = inverse of multiexpande
|
|
301
|
+
x.i_poea(z) // i13 = inverse of powerexpande
|
|
302
|
+
x.i_apea(z) // i20 = inverse of aperioexpande
|
|
303
|
+
x.i_expl(z) // i21 = inverse of explode
|
|
304
|
+
x.i_muel(z) // i22 = inverse of multiexplode
|
|
305
|
+
x.i_apel(z) // i30 = inverse of aperioexplode
|
|
306
|
+
x.i_deto(z) // i31 = inverse of detonate
|
|
307
|
+
x.i_apdt(z) // i40 = inverse of aperiodetonate
|
|
308
|
+
x.i_apeo(z) // i100 = inverse of aperionate
|
|
309
|
+
x.i_mego(z) // i101 = inverse of megote
|
|
310
|
+
x.i_mume(z) // i102 = inverse of multimegote
|
|
311
|
+
x.i_apmg(z) // i110 = inverse of aperimegote
|
|
312
|
+
x.i_mgea(z) // i111 = inverse of megoexpande
|
|
313
|
+
x.i_apme(z) // i120 = inverse of aperimegoexpande
|
|
314
|
+
x.i_mgao(z) // i200 = inverse of megoaperionation
|
|
315
|
+
x.i_gigo(z) // i201 = inverse of gigote
|
|
316
|
+
x.i_apgg(z) // i210 = inverse of aperigigote
|
|
317
|
+
x.i_ggap(z) // i300 = inverse of gigoaperionate
|
|
318
|
+
x.i_apat(z) // i1000 = inverse of aperiatotion
|
|
319
|
+
x.i_pwan(z) // i1001 = inverse of powiainate
|
|
320
|
+
x.i_epan(z) // i1010 = inverse of expandainate
|
|
321
|
+
x.i_mgan(z) // i1100 = inverse of megodainate
|
|
322
|
+
x.i_pwar(z) // i2000 = inverse of powiairate
|
|
323
|
+
x.i_apgu(z) // i10000 = inverse of aperioguate
|
|
324
|
+
x.i_iter(z) // iww = inverse of iter
|
|
325
|
+
x.i_itmu(z) // iw01 = inverse of itermult
|
|
326
|
+
x.i_cube(z) // iwx2 = inverse of cuboiter
|
|
327
|
+
x.i_expo(z) // iwa1 = inverse of expoiter
|
|
328
|
+
x.i_tria(z) // iwm2 = inverse of trioterate
|
|
329
|
+
x.i_trix(z) // iwp2 = inverse of trixxate
|
|
330
|
+
x.i_apix(z) // iwpw = inverse of aperixxate
|
|
331
|
+
x.i_epsl(z) // iepsl = inverse of epsilonate
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### The operations follow n{λ}b = n{λ[b]}n exactly
|
|
335
|
+
|
|
336
|
+
Every operation above is evaluated with the unified limit rule `n{λ}b = n{λ[b]}n` — the final operand is the **base** n, never b. Whenever the reduced level λ[y] still fits a Cantor-normal-form coefficient row the whole fundamental-sequence cascade is evaluated:
|
|
337
|
+
|
|
338
|
+
```javascript
|
|
339
|
+
MetaNum(3).iterate(5); // 3{ω^ω}5 = 3{ω^5}3 = 3{ω^4*3}3 = …
|
|
340
|
+
// … = 3{ω^4*2+ω^3*2+ω^2*2+ω*2+2}3 → layer=0, top row [1,2,2,2,2,2]
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Levels ≥ ω^ω have no finite coefficient row, so the result is stored as the compact **layer marker** of λ[y] (see the representation rule above: layer L ⇒ `10{ω^ω^…(L ω^'s)…^(ω^'s polynomial)}10`):
|
|
344
|
+
|
|
345
|
+
so the encoded ordinals grow with the operation (`iter < itmu < cube < expo < tria < trix < apix < epsl`) and with y, and `epsilonate(MSI)` is exactly the library's ε-tower cap.
|
|
346
|
+
|
|
347
|
+
### Fractional hyperoperation levels
|
|
348
|
+
|
|
349
|
+
Levels interpolate geometrically; `x{n+f}y = x{n+1}(θf)` with `θf` continuous between `x{n}y` (f=0) and `x{n+1}y` (f=1). For the canonical diagonal this is exactly `10{n+f}10 = 10{n+1}(2·5^f)`:
|
|
350
|
+
|
|
351
|
+
```javascript
|
|
352
|
+
MetaNum(10).arrow(3.5)(10); // 10{3.5}10 = 10{4}(2·5^0.5)
|
|
353
|
+
MetaNum(10).arrow(3.2)(10); // monotone between 10{3}10 and 10{4}10
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Non-integer arguments at ordinal levels
|
|
357
|
+
|
|
358
|
+
The same continuity applies to the ω-and-above operations. Successor levels follow `x{α}(m+f) = x{α-1}` applied m times to `x^f`; the ω level matches `aperiote` exactly, so composition identity holds verbatim:
|
|
359
|
+
|
|
360
|
+
```javascript
|
|
361
|
+
MetaNum(10).expande(2.1); // 10{ω+1}2.1 = 10{ω}10{ω}(10^0.1)
|
|
362
|
+
MetaNum(10).expande(2); // 10{ω}10 (continuous at the integers)
|
|
363
|
+
MetaNum(10).multiexpande(2.1); // (10{ω+1})²(10^0.1)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Limit levels** take the fundamental sequence at the full (fractional) `y`. The sequence can then carry fractional coefficients, which resolve against the base x because on the diagonal ω reads as x:
|
|
367
|
+
|
|
368
|
+
- ω^(k)·(c+f) = ω^(k)·c + ω^(k-1)·(x·f), applied top-down (ω^0.1 = x^0.1), so only the constant term can still be fractional;
|
|
369
|
+
- a leftover fractional constant γ+f is one level of interpolation: x{γ+f}x = x{γ+1}(2·(x/2)^f) — continuous at f=0 because x{γ+1}2 = x{γ}x.
|
|
370
|
+
|
|
371
|
+
**Successor levels** keep `x{α}(m+f) = x{α-1}` applied m times to `x^f`, so the value grows with f inside the interval and converges to the next integer as f → 1:
|
|
372
|
+
|
|
373
|
+
```javascript
|
|
374
|
+
MetaNum(10).h21(2.0001); // Ba2.218Ab9 f → 0: cascade bottoming at ω
|
|
375
|
+
MetaNum(10).h21(2.5); // Ba1.772Ad9 the cascade deepens with f
|
|
376
|
+
MetaNum(10).h21(2.99); // Ba2.447Aj9 → converges to h21(10,3) = Ba1.000Ak9
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
For the ω+1 / ω+2 / ω+3 levels the applications after the first still have an operand inside MSI, so those are evaluated directly by the rule (that is the `10{ω}10{ω}(10^0.1)` composition above) — which is also the exact identity. An iteration count beyond direct evaluation diagonalizes through the engine's huge-argument convention (y plus one α-level marker row). Then we have:
|
|
380
|
+
|
|
381
|
+
10{ω\*2}2.1=10{ω+2.1}10=10{ω+3}2\*5^0.1 (because 10{ω+2}10=10{ω+3}2)
|
|
382
|
+
|
|
383
|
+
3{ω\*2}2.1=3{ω+2.1}3=3{ω+3}2\*1.5^0.1
|
|
384
|
+
|
|
385
|
+
10{ω^2}2.1=10{ω\*2.1}10=10{ω\*2+10\*0.1}10=10{ω\*2+1}10
|
|
386
|
+
|
|
387
|
+
3{ω^2}2.1=3{ω\*2.1}3=3{ω\*2+3\*0.1}10=3{ω\*2+0.3}3=3{ω\*2+1}2\*1.5^0.3
|
|
388
|
+
|
|
389
|
+
10{ω^ω}2.1=10{ω^2.1}10=10{ω^2\*10^0.1}10=10{ω^2\*1.258925}10=10{ω^2\*1+ω\*2+5.8925}10=10{ω^2\*1+ω\*2+6}2*5^0.8925
|
|
390
|
+
|
|
391
|
+
3{ω^ω}2.1=3{ω^2.1}3=3{ω^2\*3^0.1}3=3{ω^2\*1.116123}3=3{ω^2\*1+1.045107}3=3{ω^2\*1+2}2*1.5^0.045107
|
|
392
|
+
|
|
393
|
+
## BEAF Operations
|
|
394
|
+
|
|
395
|
+
Bowers' Exploding Array Function (BEAF) is supported via ordinal arithmetic for 3+ arguments:
|
|
396
|
+
|
|
397
|
+
```javascript
|
|
398
|
+
// BEAF(a,b,c,d,e,f,...) = a{...+ω^3*(f-1)+ω^2*(e-1)+ω*(d-1)+c}b (the constant term keeps its value; ω-and-above coefficients decrement by 1)
|
|
399
|
+
|
|
400
|
+
// 3-entry: {a,b,c} = a↑^c b (standard up-arrow notation)
|
|
401
|
+
MetaNum.BEAF(3, 3, 2); // 3↑↑3 = 7625597484987
|
|
402
|
+
MetaNum.BEAF(3, 3, 3); // 3↑↑↑3 = tritri
|
|
403
|
+
|
|
404
|
+
// 4-entry: {a,b,c,d} = a(ω*(d-1)+c level operation)b
|
|
405
|
+
MetaNum.BEAF(2, 2, 1, 2); // 2{ω}2
|
|
406
|
+
MetaNum.BEAF(3, 3, 3, 3); // 3{ω*2+3}3
|
|
407
|
+
|
|
408
|
+
// 5+ entry: ordinal arithmetic
|
|
409
|
+
MetaNum.BEAF(10, 2, 1, 1, 2); // 10{ω^2}2
|
|
410
|
+
MetaNum.BEAF(3, 3, 3, 3, 2); // 3{ω^2+ω*2+3}3
|
|
411
|
+
MetaNum.BEAF(4, 5, 6, 7, 8, 9); // 4{ω^3*8+ω^2*7+ω*6+6}5
|
|
412
|
+
|
|
413
|
+
// Parse BEAF string notation
|
|
414
|
+
MetaNum.fromBeaf("{3,3,3}"); // 3↑↑↑3
|
|
415
|
+
MetaNum.fromBeaf("{3,3,3,3}"); // 3{ω*2+3}3
|
|
416
|
+
MetaNum.fromBeaf("{10,2,1,1,2}"); // 10{ω^2}2
|
|
417
|
+
|
|
418
|
+
// Convert to BEAF string
|
|
419
|
+
new MetaNum(7625597484987).toBeaf(); // "{7625597484987}"
|
|
420
|
+
MetaNum.BEAF(3,3,3).toBeaf(); // "{3638334640023.7783}"
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### nested BEAF
|
|
424
|
+
|
|
425
|
+
nested BEAF: {a,{b,c,d,e},f,g,h}
|
|
426
|
+
|
|
427
|
+
An argument exceeding MSI supremum-collapses (use fundamental sequences rules):
|
|
428
|
+
|
|
429
|
+
ω*i+HUGE ≈ ω*(i+1), ω^i*HUGE ≈ ω^(i+1), etc.
|
|
430
|
+
|
|
431
|
+
lower coefficients are swallowed, and the result anchors at that argument's value.
|
|
432
|
+
|
|
433
|
+
```javascript
|
|
434
|
+
MetaNum.BEAF(4, MetaNum.BEAF(4, 2, 3, 5), 3, 5); // 4{ω*4+3}4{ω*4+3}2
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## Hardy Hierarchy
|
|
439
|
+
|
|
440
|
+
`MetaNum.hardy(n)` evaluates the Hardy hierarchy `H_α(10)` where the ordinal α is built from the decimal digits of n (base 10, `hardy(1234) = H_{ω³+ω²·2+ω·3+4}(10)`):
|
|
441
|
+
|
|
442
|
+
```javascript
|
|
443
|
+
MetaNum.hardy(10); // H_ω(10) = 20
|
|
444
|
+
MetaNum.hardy(10.5); // H_ω(10+0.5) = 21
|
|
445
|
+
MetaNum.hardy(11); // H_{ω+1}(10) = 22
|
|
446
|
+
MetaNum.hardy(100); // H_{ω²}(10) = 10240
|
|
447
|
+
MetaNum.hardy(100.5); // H_{ω²}(10+0.5) ≈ 11085
|
|
448
|
+
MetaNum.hardy(1234); // H_{ω³+ω²·2+ω·3+4}(10), exact for small levels and engine-collapsed (F_j = H^{ω^j}) for deep segments
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Recursion rules:
|
|
452
|
+
-`H_0(n) = n`, `H_{α+1}(n) = H_α(n+1)` (only +1, never iterated),
|
|
453
|
+
-For fractional 0<f<1 we have `H_{α+f}(n) = H_α(n+f)`,
|
|
454
|
+
-`H_λ(n) = H_{λ[n]}(n)` with the CNF fundamental sequences.
|
|
455
|
+
|
|
456
|
+
### hardy(x, base) and FGH(x, y)
|
|
457
|
+
|
|
458
|
+
The second argument is the **base**: the ordinal is read off the digits of x in that base (default 10), and the hierarchy argument is the base itself. The base must be an integer in `[2, 1000]`.
|
|
459
|
+
|
|
460
|
+
```javascript
|
|
461
|
+
MetaNum.hardy(10, 8); // "10" reads as "12" in base 8 → H_{ω+2}(8) = 20
|
|
462
|
+
MetaNum.hardy(10, 4); // "10" reads as "22" in base 4 → H_{ω*2+2}(4) = 24
|
|
463
|
+
MetaNum.hardy(5, 8); // H_5(8) = 13
|
|
464
|
+
MetaNum.hardy(64, 8); // "100" base 8 → H_{ω²}(8) = 2048
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
`MetaNum.fgh(x, y)` is the fast-growing hierarchy entry, defined through hardy: `FGH(x, y) = H_{y^x}(y) = hardy(y^x, y)` (same base validation).
|
|
468
|
+
|
|
469
|
+
```javascript
|
|
470
|
+
MetaNum.fgh(3, 10); // = hardy(1000, 10) = H_{ω³}(10)
|
|
471
|
+
MetaNum.fgh(2, 8); // = hardy(64, 8) = 2048
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
For `base ≠ 10` the plain finite inputs take the base-`base` digit path; structured / power-tower inputs keep the decimal-specific shadowing and are rejected there.
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
### Hardy beyond ω^ω
|
|
479
|
+
|
|
480
|
+
For n ≥ 1e10 the leading exponent k ≥ 10 itself converted to a base-10 ordinal, so `hardy(1e11) = H_{ω^(ω+1)}(10)` sits at the `10{ω+1}10` scale (via `H_{ω^β}(n) = F_β(n)`), The value is evaluated per the definition (from below),so it is strictly below the matching engine hyper-op:
|
|
481
|
+
|
|
482
|
+
```javascript
|
|
483
|
+
MetaNum.hardy(1e10); // = H_{ω^ω}(10) = H_{ω^10}(10), array exactly [3086.036065328153, 9,9,9,9,9,9,9,9] — below 10{10}10
|
|
484
|
+
MetaNum.hardy(1e11); // = H_{ω^(ω+1)}(10) — below 10{ω+1}10 (expande(10,10))
|
|
485
|
+
MetaNum.hardy("1e10+11"); // H_{ω^ω+ω+1}(10) = H_{ω^ω}(22) → the truncated exact tower [3086.036…, 21×19] — the single row [非整数, 21, 21, …, 21], format "X23"
|
|
486
|
+
MetaNum.hardy("1e10+22"); // H_{ω^ω+ω*2+2}(10) → [3086.036…, 47×19], format "X49"
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
Once the definitional from-below tower `[c0, (n1−1)×(n1−2)]` (n1 = hardy(rest)) no longer fits `maxCols`, hardy keeps the TRUNCATED cascade `[3086.036…, (n1−1)×(maxCols−1)]` — the tower level n1−1 over the definitional base — instead of the engine value.
|
|
490
|
+
|
|
491
|
+
Fractional inputs collapse into ONE plain row (the fractional hyper-operation result) and hardy stays continuous across the integers:
|
|
492
|
+
|
|
493
|
+
```javascript
|
|
494
|
+
MetaNum.hardy(1e10) < MetaNum.hardy("1e10+0.5") < MetaNum.hardy(1e10+1); // single rows throughout
|
|
495
|
+
MetaNum.hardy("1e10+0.5"); // [4581.009607833985, 10,10,10,10,10,10,10,10,10]
|
|
496
|
+
MetaNum.hardy("1e10+1.5"); // [10030.57513899962, 11×10]
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
Strings of the form `"AeB+C"` (`"1e10+0.5"`, `"1e16+1e13"`, …) parse to the exact decimal sum, so the digit path never reads 0.
|
|
500
|
+
|
|
501
|
+
More generally, with n = dk·10^kExp + rest: α = ω^ord(kExp)·dk + ord(rest) is built recursively (n1 = H_ord(rest)(10)), and the leading term ω^β·dk (β = ord(kExp)) is **dk applications of H_{ω^β}, one after the other on the running value** — an application is one row `[1, β]`:
|
|
502
|
+
|
|
503
|
+
```javascript
|
|
504
|
+
MetaNum.hardy(1.1e11); // H_{ω^(ω+1)+ω^ω}(10) = H_{ω^(ω+1)}(H_{ω^ω}(10)) (one row per application)
|
|
505
|
+
MetaNum.hardy(2e11); // H_{ω^(ω+1)·2}(10) = H_{ω^(ω+1)}(H_{ω^(ω+1)}(10))
|
|
506
|
+
MetaNum.hardy(3e11); // → … [8,0,1], [2,1,1] (one more row per application)
|
|
507
|
+
MetaNum.hardy(1e16 + 1e13); // H_{ω^(ω+6)}(H_{ω^(ω+3)}(10)) → … [1,6,1]
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
So hardy is monotone across this range: `hardy(9999999999) < hardy(1e10) < hardy(10000000001)`, and `hardy(1e11) < hardy(1.1e11) < hardy(2e11)`.
|
|
511
|
+
|
|
512
|
+
### Hardy of power towers: one layer per 10^ level
|
|
513
|
+
|
|
514
|
+
For a clean tower the ordinal is ω^ord(W) — exactly one ω above hardy(W) — so **every extra 10^ level in the input raises hardy's layer by ONE, and the array rows stay those of the innermost readable expansion**:
|
|
515
|
+
|
|
516
|
+
```javascript
|
|
517
|
+
MetaNum.hardy("1e308"); // layer 0 — the digit-path cascade, last rows [8,6,0,3], [8,7,0,3]
|
|
518
|
+
MetaNum.hardy("e1e308"); // layer 1 — the SAME array rows
|
|
519
|
+
MetaNum.hardy("ee1e308"); // layer 2 — the SAME array rows, and so on
|
|
520
|
+
MetaNum.hardy("e1e10"); // = layerUp(hardy(1e10)) = [[3086.036…, 9×8]] at layer 1
|
|
521
|
+
MetaNum.hardy("eee10"); // layer 2, hardy(10^^100) → layer 98, hardy(10^^MSI) → layer MSI-2
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
The layer therefore equals `floor(tower height) − 2`; towers whose bracket is a finite ω-polynomial keep the definitional base rows instead of being folded down by the standard de-layer rule.
|
|
525
|
+
|
|
526
|
+
More generally, with n = dk·10^kExp + rest: α = ω^ord(kExp)·dk + ord(rest) is built recursively (n1 = H_ord(rest)(10)), and the leading term ω^β·dk (β = ord(kExp)) is **dk applications of H_{ω^β}, one after the other on the running value** — an application is one row `[1, β]`:
|
|
527
|
+
|
|
528
|
+
```javascript
|
|
529
|
+
MetaNum.hardy(1.1e11); // H_{ω^(ω+1)+ω^ω}(10) = H_{ω^(ω+1)}(H_{ω^ω}(10)) → [3086.036065328153, 9×8], [1,1,1] (H_{ω^ω} once, then H_{ω^(ω+1)} once)
|
|
530
|
+
MetaNum.hardy(2e11); // H_{ω^(ω+1)·2}(10) = H_{ω^(ω+1)}(H_{ω^(ω+1)}(10)) → [3086.036065328153, 9×8], [8,0,1] [1,1,1]
|
|
531
|
+
MetaNum.hardy(3e11); // → … [8,0,1], [2,1,1] (one more row per application)
|
|
532
|
+
MetaNum.hardy(1e16 + 1e13); // H_{ω^(ω+6)}(H_{ω^(ω+3)}(10)) → … [8,2,1], [1,6,1]
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
So hardy is monotone across this range: `hardy(9999999999) < hardy(1e10) < hardy(10000000001)`, and `hardy(1e11) < hardy(1.1e11) < hardy(2e11)`.
|
|
536
|
+
|
|
537
|
+
### hardy input extensions
|
|
538
|
+
|
|
539
|
+
And we have hardy(1e20) = H_{ω^(ω*2)}(10), hardy(1e100)=H_{ω^(ω^2)}(10), hardy("e1e10")=H_{ω^(ω^ω)}(10), hardy("1F10")=H_{ω^^10}(10), and so on.
|
|
540
|
+
|
|
541
|
+
`MetaNum.infinity` (alias of `MetaNum.POSITIVE_INFINITY`) is the value returned once the input passes the ε₀ ceiling: any MetaNum beyond `10^^MSI` — e.g. `G600` (= 10{3}600), `3{9}3`, or a power tower taller than `10^^MSI` — has no Hardy level inside the library, so `hardy` yields Infinity.
|
|
542
|
+
|
|
543
|
+
```javascript
|
|
544
|
+
MetaNum.hardy(1e21); // hardy(1e20) < hardy(1e21) < hardy(1e22), >1e20 scientific strings expand to exact digits — the reading stays monotone
|
|
545
|
+
MetaNum.hardy(MetaNum(10).tetr(100)); // power towers shadow to ω^ω^…^ω (k ω's): hardy(10^^k) = H_ω^ω^…^ω (k ω's)(10) — the ordinal is read off the value itself (10^W → ω^ord(W))
|
|
546
|
+
MetaNum.hardy(MetaNum(10).tetr(Number.MAX_SAFE_INTEGER)); // hardy(10^^MSI) = the MetaNum limit: layer MSI-3 (the ε-tower cap)
|
|
547
|
+
MetaNum.hardy(MetaNum("G600")) // MetaNum-object > 10^^MSI should return Infinity
|
|
548
|
+
MetaNum.hardy(MetaNum.arrow(3, 9, 3)) // = Infinity (3{9}3 is far above 10^^MSI)
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
## Layer & Serialization
|
|
552
|
+
|
|
553
|
+
```javascript
|
|
554
|
+
// Layer manipulation
|
|
555
|
+
new MetaNum(10).layerUp(); // promote to layer+1
|
|
556
|
+
new MetaNum(10).layerDown(); // demote to layer-1
|
|
557
|
+
|
|
558
|
+
// Output formats
|
|
559
|
+
new MetaNum(123).toString(); // "123"
|
|
560
|
+
new MetaNum(1e308).toString(); // "E308"
|
|
561
|
+
new MetaNum(100).toNumber(); // 100
|
|
562
|
+
new MetaNum(100).valueOf(); // "100"
|
|
563
|
+
new MetaNum(100).toFixed(2); // "100.00"
|
|
564
|
+
new MetaNum(100).toExponential(2); // "1.00e+2"
|
|
565
|
+
new MetaNum(100).toPrecision(3); // "100"
|
|
566
|
+
new MetaNum(100).toHyperE(); // "100"
|
|
567
|
+
new MetaNum(100).toStringWithDecimalPlaces(4); // "100.0000"
|
|
568
|
+
new MetaNum(100).toJSON(); // {sign:1, array:[[100]], layer:0}
|
|
569
|
+
new MetaNum(100).format(); // letter notation (format-metanum.js), e.g. MetaNum.hardy(4166).format() → "2.397G5", optional args: format(precision, small)
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
## Utility Functions
|
|
573
|
+
|
|
574
|
+
```javascript
|
|
575
|
+
// Binomial coefficient
|
|
576
|
+
new MetaNum(10).choose(3); // C(10,3) = 120
|
|
577
|
+
|
|
578
|
+
// Hyper-operation
|
|
579
|
+
MetaNum.hyper(4, 2, 3); // 2^^3 = 16 (n=4 means tetration)
|
|
580
|
+
|
|
581
|
+
// Geometric series
|
|
582
|
+
MetaNum.sumGeometricSeries(5, 1, 2); // 1+2+4+8+16 = 31
|
|
583
|
+
MetaNum.affordGeometricSeries(100, 1, 2, 0);
|
|
584
|
+
|
|
585
|
+
// Arithmetic series
|
|
586
|
+
MetaNum.sumArithmeticSeries(5, 1, 2); // 1+3+5+7+9 = 25
|
|
587
|
+
MetaNum.affordArithmeticSeries(100, 1, 2, 0);
|
|
588
|
+
|
|
589
|
+
// Configuration
|
|
590
|
+
MetaNum.config({ maxRows: 50, maxCols: 50, serializeMode: 1, debug: 1 });
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
# Mathematical Background
|
|
594
|
+
|
|
595
|
+
The library implements the extended arrow operation which is a hierarchy of functions indexed by ordinal numbers. The representation uses Cantor normal form for ordinals, where:
|
|
596
|
+
|
|
597
|
+
- ω represents the first infinite ordinal
|
|
598
|
+
- ω^ω represents ω raised to the power of ω
|
|
599
|
+
- ε₀ is the limit of ω, ω^ω, ω^ω^ω, ...
|
|
600
|
+
|
|
601
|
+
For more information, see: <https://en.wikipedia.org/wiki/Ordinal_arithmetic>
|
|
602
|
+
|
|
603
|
+
## Definition
|
|
604
|
+
|
|
605
|
+
Let n and b be natural numbers, and α be a countable ordinal
|
|
606
|
+
|
|
607
|
+
- rule 1: If α=0, n{α}b=n×b
|
|
608
|
+
- rule 2: If α is a successor ordinal, then n{α}b =n if b=1, =n{α-1}n{α}(b-1) if b>1
|
|
609
|
+
- rule 3: If α is a limit ordinal, then n{α}b=n{α\[b]}n
|
|
610
|
+
- rule 4: Operations are calculated from right to left
|
|
611
|
+
|
|
612
|
+
where α\[b] denotes the b-th element of the fundamental sequence assign to the limit ordinal of α, see also fundamental sequences for limit ordinals written in Cantor normal form:
|
|
613
|
+
|
|
614
|
+
- ω\[n]=n
|
|
615
|
+
- ω^(α+1)\[n]=ω^α×n where ω^α×n=ω^α+ω^α+...+ω^α with n ω^α's
|
|
616
|
+
- ω^α\[n]=ω^(α\[n]) if and only if α is a limit ordinal
|
|
617
|
+
- (ω^(α_1)+ω^(α_2)+...+ω^(α_k))\[n]=ω^(α_1)+ω^(α_2)+...+ω^(α_k)\[n], where α_1>=α_2>=...>=α_k
|
|
618
|
+
- ε₀\[0]=1 and ε₀\[n+1]=ω^ε₀\[n]
|
|
619
|
+
|
|
620
|
+
### The application count of each ordinal row
|
|
621
|
+
|
|
622
|
+
Expanding rules 2-3 all the way down shows that **only the top row depends on the argument b**
|
|
623
|
+
— every row below it is produced by decomposing with the base n as the operand:
|
|
624
|
+
- successor α: n{α}b = n{α-1}^(b-2) (n{α-1}n), so the α-1 row carries **b-2** applications and every lower row (which comes from n{α-1}n, n{α-2}n, … whose operand is n) carries **n-2**;
|
|
625
|
+
- limit α: rule 3 first rewrites n{α}b = n{α\[b]}n, so the operand is n at every level and **all** rows carry **n-2**.
|
|
626
|
+
- when expanded ordinal rows >= maxRows, it is truncated, and array[0] is default [10] and the first ordinal row count add 1.(to get precise value)
|
|
627
|
+
|
|
628
|
+
```javascript
|
|
629
|
+
MetaNum(10).h13(20); // 10{ω+3}20 = 10{ω+2}^18 10{ω+1}^8 10{ω}^8 10{ω}10
|
|
630
|
+
// array → [[1e10,8,8,8,8,8,8,8,8], [8,0,1], [8,1,1], [18,2,1]]
|
|
631
|
+
MetaNum(10).h12(20); // 10{ω+2}20 → [8,0,1] [18,1,1]
|
|
632
|
+
MetaNum(3).h13(20); // 3{ω+3}20 → [1,0,1] [1,1,1] [18,2,1] (x-2 = 1)
|
|
633
|
+
MetaNum(10).h21(20); // 10{ω*2+1}20 = 10{ω*2}^18 (10{ω*2}10)
|
|
634
|
+
// 10{ω*2}10 = 10{ω+10}10 → the ω..ω+9 cascade, every count x-2 = 8
|
|
635
|
+
// array → [[…,8,…], [8,0,1] … [8,9,1], [18,0,2]]
|
|
636
|
+
MetaNum(10).h22(20); // … + [8,0,2] + [18,1,2] (ω*2 row = 8, ω*2+1 row = 18)
|
|
637
|
+
MetaNum(3).h21(20); // 3{ω*2+1}20 → [1,0,1] [1,1,1] [1,2,1] [18,0,2] (x-2 = 1)
|
|
638
|
+
MetaNum(10).h100(20); //10{ω^2}20=10{ω*20}10=10{ω*19+9}^8 10{ω*19+8}^8 ... 10{ω*18+1}^9 10
|
|
639
|
+
// array → [[10], [9,1,18], [8,2,18] … [8,8,19], [8,9,19]] (maxrows=20)
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
## Examples
|
|
643
|
+
|
|
644
|
+
642663{0}178187=642663×178187=114514191981
|
|
645
|
+
|
|
646
|
+
10{1}5=10{0}10{1}4=10{0}10{0}10{1}3=10{0}10{0}10{0}10{1}2=10{0}10{0}10{0}10{0}10{1}1=10×10×10×10×10=10^5=100000
|
|
647
|
+
|
|
648
|
+
10{2}4=10{1}10{2}3=10{1}10{1}10{2}2=10{1}10{1}10{1}10{2}1=10{1}10{1}10{1}10=10^(10^(10000000000))
|
|
649
|
+
|
|
650
|
+
10{3}3=10{2}10{2}10=10{2} 9(10{1})'s 10=10↑↑(10^10^10^10^10^10^10^10^10000000000)
|
|
651
|
+
|
|
652
|
+
3{ω}5=3{5}3=3{4}3{5}2=3{4}3{4}3=3{4}3{3}3{3}3=3{4}3{3}3{2}3{2}3=3{4}3{3}3{2}3{1}3{1}3=3↑↑↑↑3↑↑↑3↑↑7625597484987
|
|
653
|
+
|
|
654
|
+
5{ω+1}4=5{ω}5{ω+1}3=5{ω}5{ω}5{ω+1}2=5{ω}5{ω}5{ω}5{ω+1}1=5{ω}5{ω}5{ω}5=5{ω}5{ω}5{5}5=5{ω}5{5{5}5}5=5{5{5{5}5}5}5
|
|
655
|
+
|
|
656
|
+
4{ω+2}3=4{ω+1}4{ω+1}4=4{ω+1}4{ω}4{ω}4{ω}4=4{ω+1}4{4{4{4}4}4}4=4{ω}4{ω}... with 4{4{4{4}4}4}4 4's
|
|
657
|
+
|
|
658
|
+
10{ω×2}10=10{ω+10}10=9(10{ω+9})'s 10=8(10{ω+9})'s 9(10{ω+8})'s 10=8(10{ω+9})'s 8(10{ω+8})'s ... 8(10{ω+1})'s 8(10{ω})'s 8(10{9})'s ... 8(10{1})'s 10000000000
|
|
659
|
+
|
|
660
|
+
10{ω^2}4=10{(ω^2)[4]}10=10{ω×4}10=10{(ω×4)[10]}10=10{ω×3+10}10=10{ω×3+9}10{ω×3+10}9=...=10{ω×3+9} 8(10{ω×3+8})'s ... 8(10{ω×3+1})'s 8(10{ω×3})'s 8(10{ω×2+9})'s ... 8(10{ω})'s ... 8(10{1})'s 10000000000
|
|
661
|
+
|
|
662
|
+
10{ω^ω}4=10{(ω^ω)[4]}10=10{ω^4}10=10{(ω^4)[10]}10=10{ω^3×10}10=... (every limit step ends on the base 10; successor steps iterate) ... 8(10{1})'s 10000000000
|
|
663
|
+
|
|
664
|
+
10{ω^(ω^2)}4=10{(ω^(ω^2))[4]}10=10{ω^(ω×ω)}10=10{ω^(ω×4)}10=10{ω^(ω×3+10)}10=... (rule 3: each FS step ends on the base 10)
|
|
665
|
+
|
|
666
|
+
10{ε₀}4=10{ε₀[4]}10=10{ω^(ω^(ω^ω))}10=10{ω^(ω^(ω^10))}10=... (ε₀[n+1]=ω^(ε₀[n]), final operand 10)
|
|
667
|
+
|
|
668
|
+
# dlsdl's Letter Notation
|
|
669
|
+
|
|
670
|
+
> Formal semantics and the design decisions behind the notation are recorded in
|
|
671
|
+
> [docs/notation-semantics.md](docs/notation-semantics.md); the executable
|
|
672
|
+
> regression suite is [test_mixed.js](test_mixed.js).
|
|
673
|
+
|
|
674
|
+
Modified from PsiCubed's letter notation(<https://googology.fandom.com/wiki/User_blog:PsiCubed2/My_Letter_Notation>)
|
|
675
|
+
|
|
676
|
+
The idea here is to extend the PsiCubed's letter notation to much larger numbers reach level ε0 of FGH or HH. The properties we wish to preserve here are:
|
|
677
|
+
|
|
678
|
+
(1) Any number has a unique standard representation in the system.
|
|
679
|
+
|
|
680
|
+
(2) Given the standard representation of two numbers, one can immediately tell which one is larger without any calculations.
|
|
681
|
+
|
|
682
|
+
## The format of the proposed notation
|
|
683
|
+
|
|
684
|
+
Our final notation will look like this:
|
|
685
|
+
|
|
686
|
+
\[symbol]\[letter]\[number]
|
|
687
|
+
|
|
688
|
+
where \[symbol] can be one of the following: empty,!,@,#,$,%,&,……
|
|
689
|
+
|
|
690
|
+
where \[letter] can be one of the following: E,F,G,H,……,Aa,Ab,Ac,……,Ba,Bb,……,Aaa,……
|
|
691
|
+
|
|
692
|
+
and \[number] can be any positive real number (nonintegers included).
|
|
693
|
+
|
|
694
|
+
## Single letter notation
|
|
695
|
+
|
|
696
|
+
### The First Levels: A Continuous version of Knuth Arrows
|
|
697
|
+
|
|
698
|
+
Let α be a positive real number, β be a positive integer, we'll define (use extended arrow operation):
|
|
699
|
+
|
|
700
|
+
Eα = 10^α = 10{1}α
|
|
701
|
+
|
|
702
|
+
Fα = EEEE...EEE(10^frac(α)) with int(α) E's = 10{2}α
|
|
703
|
+
|
|
704
|
+
Gα = FFFF...FFF(10^frac(α)) with int(α) F's = 10{3}α
|
|
705
|
+
|
|
706
|
+
Hα = GGGG...GGG(10^frac(α)) with int(α) G's = 10{4}α
|
|
707
|
+
|
|
708
|
+
then we'll have I,J,K,... to Z ,each with the same definition as Hα.
|
|
709
|
+
|
|
710
|
+
Note that according to these definitions we have:
|
|
711
|
+
|
|
712
|
+
(1) For α≤1: Eα = Fα = Gα = Hα = ... = Zα = 10^α
|
|
713
|
+
|
|
714
|
+
(2) For any integer β: Eβ = 10{1}β, Fβ = 10{2}β, Gβ = 10{3}β, Hβ = 10{4}β
|
|
715
|
+
|
|
716
|
+
the γ-th letter β represents 10(γ-4 arrows)β = 10{γ-4}β
|
|
717
|
+
|
|
718
|
+
So the above definitions are indeed an extention of Knuth arrows to nonintegers.
|
|
719
|
+
|
|
720
|
+
### Letter-Canonical Forms
|
|
721
|
+
|
|
722
|
+
If α is a number greater than 1 and Γ is a one of the letters E,F,G,H,...,Z then there is a unique number β such that:
|
|
723
|
+
|
|
724
|
+
α = Γβ.
|
|
725
|
+
|
|
726
|
+
And we call "Γβ" the Γ-Canonical Form of the number α.
|
|
727
|
+
|
|
728
|
+
For example, the E-Canonical form of 1000 is E3:
|
|
729
|
+
|
|
730
|
+
E3 = 10^3 = 1000.
|
|
731
|
+
|
|
732
|
+
And the F-Canonical form of 1000 is about F1.47712:
|
|
733
|
+
|
|
734
|
+
F1.47712 = E(10^0.47712) ≈ E3 = 10^3 = 1000.
|
|
735
|
+
|
|
736
|
+
### Binary-Letter-Canonical Forms
|
|
737
|
+
|
|
738
|
+
To recreate ordinary scientific notation, we'll define a binary version of the letter functions like this:
|
|
739
|
+
|
|
740
|
+
Let Γ be one of the letters E,F,G,H,...,Z, β be a nonnegative integer and α be a real number between 1 and 10. Then:
|
|
741
|
+
|
|
742
|
+
αΓβ = Γ(β+log(α))
|
|
743
|
+
|
|
744
|
+
For Example:
|
|
745
|
+
|
|
746
|
+
7E3 = E(3+log(7)) = 10^(3+log(7)) = 7\*10^3 = 7000
|
|
747
|
+
|
|
748
|
+
7F3 = F(3+log(7)) = EEE(10^log(7)) = EEE7 = 10^10^10^7
|
|
749
|
+
|
|
750
|
+
So αEβ is nothing more than ordinary scientific notation.
|
|
751
|
+
|
|
752
|
+
And αFβ is a power tower of β 10's topped by an α.
|
|
753
|
+
|
|
754
|
+
And again, given any specific letter (E,F,G,H,...,Z), ANY number greater than 1 has a unique representation as αΓβ (with 1≤α<10). So we can call this the Binary-Γ-Canonical Form of α.
|
|
755
|
+
|
|
756
|
+
## Multi letter notation
|
|
757
|
+
|
|
758
|
+
### Defining Aa - The First Diagonalization
|
|
759
|
+
|
|
760
|
+
In the previous section we've defined a finite sequence of functions, so we can diagonalize over them:
|
|
761
|
+
|
|
762
|
+
let 10{1}α = Eα, 10{2}α = Fα, 10{3}α = Gα, ..., 10{22}α = Zα.
|
|
763
|
+
|
|
764
|
+
we had: Aaα = 10{α}10, so Aa has ω hyper-operation level.
|
|
765
|
+
|
|
766
|
+
Then, we'll give a definition for non-integer 10{α}10 and amend the definition of Aa:
|
|
767
|
+
|
|
768
|
+
- Aaα = 10{α}10 = 10{int(α)+1}2\*5^frac(α)
|
|
769
|
+
|
|
770
|
+
The seemingly complex expression simply gives us a smooth geometric curve between 2 and 10. This ensures that Aa would be continuous, given the identity 10{β}10 = 10{β+1}2.
|
|
771
|
+
|
|
772
|
+
Then we can define Binary-Letter-Canonical form of Aa: αAaβ = 10{β+1}α = 10{β}10{β}10...{β}10^frac(α) with int(α)10's
|
|
773
|
+
|
|
774
|
+
For example, 1Aa10=10, 2Aa10 = 10{10}10, 2.5Aa10 = 10{10}2.5 = 10{10}10{10}3.162, 3Aa10 = 10{10}10{10}10, Aa10.5 = 10{11}2\*5^0.5 = 10{11}4.472 = 4.472Aa10, 10Aa10 = 10{10}^9 10 = 10{11}10 = 2Aa11
|
|
775
|
+
|
|
776
|
+
### Ab,Ac,Ad,...,Az and their Universal Binary-Letter-Canonical Forms
|
|
777
|
+
|
|
778
|
+
The definitions of Ab,Ac,Ad,...,Az are simple enough:
|
|
779
|
+
|
|
780
|
+
Abα = AaAa...AaAa(10^frac(α)) with int(α) Aa's = 10{ω+1}α
|
|
781
|
+
|
|
782
|
+
Acα = AbAb...AbAb(10^frac(α)) with int(α) Ab's = 10{ω+2}α
|
|
783
|
+
|
|
784
|
+
then we have Ad,Ae,...,Az, each with the same definition as Ab and Ac, and that's it. So A(the β+1-th lowercase letter)α is 10{ω+β}α.
|
|
785
|
+
|
|
786
|
+
Again we have Ab0=Ac0=Ad0=...=Az0=1, Ab1=Ac1=Ad1=...=Az1=10, Aa10=Ab2, Ab10=Ac2, ... and Ab,Ac,Ad,...,Az are all continuous. So any number greater than 1 has a unique Ab to Az Canonical Form.
|
|
787
|
+
|
|
788
|
+
Moreover, since 10{10}10=Aa10=Ab2(2Aa10=1Ab2), we can extend our definition of the Binary-Letter-Canonical form up to Az:
|
|
789
|
+
|
|
790
|
+
(1) Set a threshold number θ (such as 1000, that's 1E3)
|
|
791
|
+
|
|
792
|
+
(2) if the number <θ then we write down the scientific notation (...E...) of this number.
|
|
793
|
+
|
|
794
|
+
(3) Otherwise, we write Γα → 10^frac(α)Γint(α) for letter combinations (E~Z, Ab~Az) or → 2*5^frac(α)Γint(α) for Aa, and 2≤α<θ. If there is more than one possible choice, we choose the letter combination which comes first in order.
|
|
795
|
+
|
|
796
|
+
Examples:
|
|
797
|
+
|
|
798
|
+
10{20}10 = 1X10 = 1Y2 = 2Aa20, so we write it as 1.000X10.
|
|
799
|
+
|
|
800
|
+
10{30}10 = 2Aa30, so we write it as 2.000Aa30.
|
|
801
|
+
|
|
802
|
+
10{ω+1}10 = 1Ab10 = 1Ac2, so we write it as 1.000Ab10.
|
|
803
|
+
|
|
804
|
+
### Defining from Ba to Bz
|
|
805
|
+
|
|
806
|
+
We already know how to do recursion (F,G,H,I,...,Z) and simple diagonalization (Aa) in our continuous system, so we can easily extend our system up to ω\*2 level. In order to track our progress, we'll define:
|
|
807
|
+
|
|
808
|
+
- 10{α}10 = Aaα, 10{ω+β+1}α = 10{ω+β}10{ω+β}...10^frac(α) with int(α) 10{ω+β}'s
|
|
809
|
+
|
|
810
|
+
And define Baα in a way similar to Aaα:
|
|
811
|
+
|
|
812
|
+
Baα = 10{ω+α}10 = 10{ω+int(α)+1}2\*5^frac(α)
|
|
813
|
+
|
|
814
|
+
This gives rise to writing numbers in Ba Canonical form and extend the universal Binary-Letter-Canonical form of Ba: αBaβ = 10{ω+β+1}α = 10{ω+β}10{ω+β}10...{ω+β}10^frac(α) with int(α)10's. Because of 10{ω+β}10 = 10{ω+β+1}2, α in αBaβ has a range of [2,10).
|
|
815
|
+
|
|
816
|
+
Then we can define Bb,Bc,Bd,...,Bz with recursions in a similar way. Bbα = BaBa...BaBa(10^frac(α)) with int(α) Ba's = 10{ω\*2+1}α, and Bcα = BbBb...BbBb(10^frac(α)) with int(α) Bb's = 10{ω\*2+2}α, etc. So B(the β+1-th lowercase letter)α is 10{ω\*2+β}α.
|
|
817
|
+
|
|
818
|
+
### A Supporting Extended Arrow Operation and Aaa
|
|
819
|
+
|
|
820
|
+
We can, of-course, repeat what we did in the previous section as many times as we wish and get the following ω^2-level notation (β,γ ≥ 0 are integers, and α≥0 is real):
|
|
821
|
+
|
|
822
|
+
(i) 10{1}α = 10^α
|
|
823
|
+
|
|
824
|
+
(ii) 10{ω\*β+γ+1}α = 10{ω\*β+γ}10{ω\*β+γ}...10^frac(α) with int(α) 10{ω\*β+γ}'s
|
|
825
|
+
|
|
826
|
+
(iii) 10{ω\*β+α}10 = 10{ω\*β+int(α)+1}2\*5^frac(α)
|
|
827
|
+
|
|
828
|
+
(iv) 10{ω\*(β+1)}α = 10{ω\*β+α}10
|
|
829
|
+
|
|
830
|
+
Note that {ω\*β+γ} is a valid extended arrow operation. Also, in this new notation we can write Baα = 10{ω+α}10, Bbα = 10{ω\*2+1}α,... Bzα = 10{ω\*2+25}α.
|
|
831
|
+
|
|
832
|
+
We can extend to more uppercase letters: Caα = 10{ω\*2+α}10, Cbα = 10{ω\*3+1}α, ..., Zaα = 10{ω\*25+α}10, ..., and finally Zzα = 10{ω\*26+25}α.
|
|
833
|
+
|
|
834
|
+
So we have Qq1.000Qe308 = 10{ω17+16}10{ω17+4}308
|
|
835
|
+
|
|
836
|
+
And with this new supporting notation we can now to define:
|
|
837
|
+
|
|
838
|
+
- Aaaα = 10{ω\*int(α)+10\*frac(α)}10
|
|
839
|
+
|
|
840
|
+
Containing a very neat trick that allows us to do the double-diagonalization with a single number: Aaa1.5 = 10{ω+5}10, Aaa2.5 = 10{ω\*2+5}10
|
|
841
|
+
|
|
842
|
+
At any rate, it isn't too difficult to see that Aaa behaves "nicely" and allows us to speak of Aaa Canonical Forms of any number. Aaa1=Aa10, Aaa2=Ba10, ..., Aaa26=Za10 take the foundamental sequences.
|
|
843
|
+
|
|
844
|
+
This also enables us to write the unversal Binary-Letter-Canonical form of any number up to Aaa: αAaaβ = 10{ω^2}(log5(α/2)+β). Since 10{ω^2}1=10{ω}10, 10{ω^2}2=10{ω\*2}10, α in αAaaβ has a range of [2,10).
|
|
845
|
+
|
|
846
|
+
## Symbol and letter notation
|
|
847
|
+
|
|
848
|
+
### Notations with more than three letters, and !Aa
|
|
849
|
+
|
|
850
|
+
Extended arrow operations can be easily extended, like so:
|
|
851
|
+
|
|
852
|
+
(i) 10{1}α = 10^α
|
|
853
|
+
|
|
854
|
+
(ii) 10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν+1}α = 10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν}10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν}...10^frac(α) with int(α) 10{...+ω^3\*β+ω^2\*γ+ω\*δ+ν}'s
|
|
855
|
+
|
|
856
|
+
(iii) 10{...+ω^3\*β+ω^2\*γ+ω\*δ+α}10 = 10{...+ω^3\*β+ω^2\*γ+ω\*δ+int(α+1)}2\*5^frac(α)
|
|
857
|
+
|
|
858
|
+
(iv) 10{(...+ω^3\*β+ω^2\*γ+ω\*δ+μ+1)\*ω^κ}α = 10{(...+ω^4\*β+ω^3\*γ+ω^2\*δ+ω\*μ+α)\*ω^(κ-1)}10
|
|
859
|
+
|
|
860
|
+
(v) 10{(...+ω^3\*β+ω^2\*γ+ω\*δ+α)\*ω^κ}10 = 10{(...+ω^4\*β+ω^3\*γ+ω^2\*δ+ω\*int(α)+frac(α)\*10)\*ω^κ}10
|
|
861
|
+
|
|
862
|
+
The first 4 rules are a simple and direct extention of the {ω\*β+γ} notation.
|
|
863
|
+
|
|
864
|
+
Rule (v) is an interesting one, though. It basically tells us that if we have an ordinal which ends with ω^n\*0 terms, then the digits of the fractional part of α are to be distributed among the terms. For example:
|
|
865
|
+
|
|
866
|
+
- 10{ω^6\*114+ω^5\*514+ω^4\*1.9198}10 = 10{ω^6\*114+ω^5\*514+ω^4+ω^3\*9+ω^2+ω\*9+8}10.
|
|
867
|
+
|
|
868
|
+
Now, all that is left to do is to define !Aa, which has ω^ω level.
|
|
869
|
+
|
|
870
|
+
- !Aaα ≡ A(a×⌊α⌋)(α) — the letter token carrying ⌊α⌋ lowercase a's applied at argument α (notation-semantics decision 1B). For a non-integer α this is the continuous extension inside each unit interval (e.g. !Aa1.5 = Aa1.5, !Aa2.5 = Aaa2.5).
|
|
871
|
+
- For an INTEGER α = n the "!" adds one ω^ to the level, so !Aan = 10{ω^n}10 evaluated as the full rule-3 cascade: !Aa1 = 10{ω}10 = 10{10}10 = Aa10, !Aa2 = 10{ω^2}10, !Aa3 = 10{ω^3}10. (This is NOT the token application A(a×n)(n) — Aaaa3 ≠ !Aa3.) The stored form is the base [10] plus the cascade's ordinal rows; the higher symbols keep the very same array one layer up: @Aa3 (layer 1) = 10{ω^(ω^3)}10, #Aa3 (layer 2) = 10{ω^(ω^(ω^3))}10.
|
|
872
|
+
- The formula !Aaα = 10{ω^int(α)\*frac(α)}10 is only the rule-(v) digit-distribution shorthand: read literally it degenerates at integers (int(1)·frac(1) = 0 gives 10{0}10 = 100), so it must not be used as an executable definition.
|
|
873
|
+
|
|
874
|
+
Then we have !Aa1 = Aa10 (the diagonal reading above); the earlier claim "!Aa2 = Aaa10" does not hold — !Aa2 = 10{ω^2}10 while Aaa10 is the compact ω²-marker. Just like the previous letters, any number can be written as !Aaα. Here, it is actually the binary form of !αAaβ = !Aa(β+log₅(α/2)) which has the most intuitive meaning:
|
|
875
|
+
|
|
876
|
+
In terms of the extended arrow operation, β tells us ω^β is in the ordinal and the digits of α tell us its coefficient and what residue ordinals are. Actually, !αAaβ has a more ω^ layer compare to αAaβ in ordinal level. For example, !2.0000Aa4 = !Aa4 = 10{ω^4}10 and 2.0000Aa4 = 10{4}10 (α = 2 contributes log₅(2/2) = 0, so the two spellings coincide)
|
|
877
|
+
|
|
878
|
+
And in terms of ordinals, β gives us the maximum power of ω and the digits of α give us the coefficents of the various powers of ω, these neat relations are also true for β=1 and α≥2.
|
|
879
|
+
|
|
880
|
+
### Higher dimensional arrays and @Aa
|
|
881
|
+
|
|
882
|
+
With the definition of the extended arrow operation and the symbol !, one can easily define new operations up to ω^ω^ω level.
|
|
883
|
+
|
|
884
|
+
By adding ! before a letter notation, it adds a ω^ layer (likes the same ordinal but changes from HH to FGH). Aa represents ω level, so !Aa represents ω^ω level. Then we can define !Ab (ω^(ω+1)), !Ac, !Ad, ..., !Az with the same meaning as !Aa, and !Ba (ω^(ω\*2)), !Bb, !Bc, ..., !Bz, !Aaa, etc. Comparing these with the previous letters, we can see that notations with ! symbol have a more ω^ than those without ! symbol. Fractional number of rows, columns, etc.. are defined in the same way.
|
|
885
|
+
|
|
886
|
+
Now, all that is left to do is to define @Aa, which has ω^ω^ω level.
|
|
887
|
+
|
|
888
|
+
- @Aaα = 10{ω^(ω^int(α)\*frac(α))}10
|
|
889
|
+
|
|
890
|
+
### Nested arrays and more symbols
|
|
891
|
+
|
|
892
|
+
The Definiton of more symbols is similar to the definition of @Aa.
|
|
893
|
+
|
|
894
|
+
- \#Aaα \~ 10{ω^ω^(ω^int(α)\*frac(α))}10
|
|
895
|
+
|
|
896
|
+
- \$Aaα \~ 10{ω^ω^ω^(ω^int(α)\*frac(α))}10
|
|
897
|
+
|
|
898
|
+
Then we can define (the β-th symbol or symbol combination)Aaα = 10{ω^ω^...^(ω^int(α)\*frac(α))(β ω's)}10
|
|
899
|
+
|
|
900
|
+
### Definition of the final letter: ε
|
|
901
|
+
|
|
902
|
+
ε represents exponent tower layers of ω.
|
|
903
|
+
|
|
904
|
+
- αεβ \~ 10{ω^ω^...^(ω^int(α)\*frac(α))(β ω's)}10
|
|
905
|
+
|
|
906
|
+
### Using dlsdl's letter notation, the biggest number we can define in Metanum is about ε9.007E15
|
|
907
|
+
|
|
908
|
+
# format-metanum
|
|
909
|
+
|
|
910
|
+
## Description
|
|
911
|
+
|
|
912
|
+
Implementation of dlsdl's letter notation for large number library, currently metanum.js
|
|
913
|
+
|
|
914
|
+
the letter notations follow **diagonal letters**: names ending in `a` (`Aa` = ω, `Ba` = ω·2, `Aaa` = ω², …) carry the mantissa `α = 2·5^f ∈ [2,10)`: `10{ω*3}100=10{ω*2+100}10` → `2.000Ca100`, `10{ω^2}100=10{ω*100}10` → `2.000Aaa100`. And mantissa `α∈[1,10)` for the other letters: `10{ω*3+1}100=10{ω*3}^99 10` → `1.000Cb100`
|
|
915
|
+
|
|
916
|
+
## format options
|
|
917
|
+
|
|
918
|
+
```javascript
|
|
919
|
+
smallNotationUseE // 1. for small value notations, true then use αE-β,false then use number⁻¹
|
|
920
|
+
smallNotationThreshold // 2. =n then value < 10^-n uses small notation
|
|
921
|
+
decimalPlaces // 3. for normal notations, =0 is 1,=1 is 1.0,=2 is 1.00 etc.
|
|
922
|
+
decimalThreshold // 4. =n then value >= 10^n only show integer part
|
|
923
|
+
useCommas // 5. whether to show commas in normal numbers (true/false)
|
|
924
|
+
sciThreshold // 6. =n then value >= 10^n use scientific notation, same for β in αEβ
|
|
925
|
+
sciSignificantDigits // 7. =n then α has n decimal places in αEβ
|
|
926
|
+
sciDecimalThreshold // 8. =n then β >= 10^n in αEβ only show integer part of α
|
|
927
|
+
singleLetterDigits // 9. α's decimal places in αFβ,αGβ...αZβ
|
|
928
|
+
repeatLetterThreshold // 10. =n then n repeated single letters use next letter notation
|
|
929
|
+
multiLetterDigits // 11. α's decimal places in αAaβ,αAbβ...αAaaβ and above
|
|
930
|
+
multiLetterRepeatThreshold// 12. =n then n repeated multi letter combinations use next letter notation
|
|
931
|
+
multiLetterLimit // 13. =n then length of multi letter combinations does not exceed n, exceed then switch to next notation (length of Aa~Zz is 2, Aaa~Zzz is 3, Aaaa~Zzzz is 4...)
|
|
932
|
+
epsilonSignificantDigits // 14. α's decimal places in αεβ
|
|
933
|
+
```
|
|
934
|
+
|
|
935
|
+
## Cases
|
|
936
|
+
|
|
937
|
+
- 0 ~ 10^-smallNotationThreshold: E- format(αE-β=α×10^-β; E-αEβ=10^-(α×10^β); E-……=10^-……)(smallNotationUseE true) or ……⁻¹(reciprocal)
|
|
938
|
+
- 10^-smallNotationThreshold ~ 10^decimalThreshold: decimal format (decimalPlaces digits)
|
|
939
|
+
- 10^decimalThreshold ~ 10^sciThreshold: comma format(useCommas true) or integer format
|
|
940
|
+
- 10^sciThreshold ~ 10^(10^sciThreshold): exponential as well as αEβ format
|
|
941
|
+
- 10^(10^sciThreshold) ~ 10^^(repeatLetterThreshold+1): n E's αEβformat(EαEβ, EEαEβ, EEEαEβ……)
|
|
942
|
+
- 10^^(repeatLetterThreshold+1) ~ 10^^(10^sciThreshold): αFβ format
|
|
943
|
+
- 10^^(10^sciThreshold) ~ 10^^(10^^(repeatLetterThreshold+1)): FαEβ, FEαEβ, FEEαEβ…… format
|
|
944
|
+
- 10^^(10^^(repeatLetterThreshold+1)) ~ 10^^^(repeatLetterThreshold+1): FαFβ, FFαFβ, FFFαFβ…… format
|
|
945
|
+
- 10^^^(repeatLetterThreshold+1) ~ 10^^^(10^sciThreshold): αGβ format
|
|
946
|
+
- 10^^^(10^sciThreshold) ~ 10^^^(10^^(repeatLetterThreshold+1)): GαEβ, GEαEβ,…… format
|
|
947
|
+
- 10^^^(10^^(repeatLetterThreshold+1)) ~ 10{4}(repeatLetterThreshold+1): GαGβ, GGαGβ,…… format
|
|
948
|
+
- 10{4}(repeatLetterThreshold+1) ~ 10{5}(repeatLetterThreshold+1): αHβ, HαEβ, HEαEβ, HαFβ, HFαFβ, HαGβ, HGαGβ, HαHβ, HHαHβ,…… format
|
|
949
|
+
|
|
950
|
+
…………
|
|
951
|
+
|
|
952
|
+
- 10{22}(repeatLetterThreshold+1) ~ 10{23}(repeatLetterThreshold+1): αZβ format; ZαEβ, ZEαEβ, ……, ZαZβ, ZZαZβ,…… format
|
|
953
|
+
- 10{23}(repeatLetterThreshold+1) ~ 10{10^sciThreshold}10(=10{ω}(10^sciThreshold)): αAaβ format
|
|
954
|
+
- 10{ω}(10^sciThreshold) ~ 10{ω+1}(multiLetterRepeatThreshold+1): AaαEβ, ……, AaαAaβ, AaAaαAaβ…… format
|
|
955
|
+
- 10{ω+1}(multiLetterRepeatThreshold+1) ~ 10{ω+1}(10^sciThreshold): αAbβ format
|
|
956
|
+
- 10{ω+1}(10^sciThreshold) ~ 10{ω+2}(multiLetterRepeatThreshold+1): AbαEβ, ……, AbαAbβ, AbAbαAbβ…… format
|
|
957
|
+
- 10{ω+2}(multiLetterRepeatThreshold+1) ~ 10{ω+2}(10^sciThreshold): αAcβ format
|
|
958
|
+
|
|
959
|
+
…………
|
|
960
|
+
|
|
961
|
+
- 10{ω+25}(multiLetterRepeatThreshold+1) ~ 10{ω+25}(10^sciThreshold): αAzβ format
|
|
962
|
+
- 10{ω+25}(10^sciThreshold) ~ 10{ω+26}(multiLetterRepeatThreshold+1): AzαEβ to AzαAzβ, AzAzαAzβ…… format
|
|
963
|
+
- 10{ω+26}(multiLetterRepeatThreshold+1) ~ 10{ω+10^sciThreshold}10(=10{ω×2}(10^sciThreshold)): αBaβ format
|
|
964
|
+
- 10{ω×2}(10^sciThreshold) ~ 10{ω×2}(multiLetterRepeatThreshold+1): BaαEβ to BaαBaβ, BaBaαBaβ…… format
|
|
965
|
+
|
|
966
|
+
…………
|
|
967
|
+
|
|
968
|
+
- 10{ω×2+26}(multiLetterRepeatThreshold+1) ~ 10{ω×2+10^sciThreshold}10(=10{ω×3}(10^sciThreshold)): αCaβ format
|
|
969
|
+
- 10{ω×3}(10^sciThreshold) ~ 10{ω×3}(multiLetterRepeatThreshold+1): CaαEβ to CaαCaβ, CaCaαCaβ…… format
|
|
970
|
+
|
|
971
|
+
…………
|
|
972
|
+
|
|
973
|
+
- 10{ω×26+25}(multiLetterRepeatThreshold+1) ~ 10{ω×26+25}(10^sciThreshold): αZzβ format
|
|
974
|
+
- 10{ω×26+25}(10^sciThreshold) ~ 10{ω×26+26}(multiLetterRepeatThreshold+1): ZzαEβ to ZzαZzβ, ZzZzαZzβ…… format
|
|
975
|
+
- 10{ω×26+26}(multiLetterRepeatThreshold+1) ~ 10{ω×(10^sciThreshold)}10(=10{ω^2}(10^sciThreshold)): αAaaβ format
|
|
976
|
+
- 10{ω^2}(10^sciThreshold) ~ 10{ω^2}(multiLetterRepeatThreshold+1): AaaαEβ to AaaαAaaβ, AaaAaaαAaaβ…… format
|
|
977
|
+
|
|
978
|
+
…………
|
|
979
|
+
|
|
980
|
+
- 10{……+ω^3×26+ω^2×26+ω×26+26}10 ~ 10{ω^ω}(10^sciThreshold): !αAaβ format
|
|
981
|
+
- 10{ω^ω}(10^sciThreshold) ~ 10{ω^(……ω^3×26+ω^2×26+ω×26+26)}10: !AaαEβ, !αAbβ, !αAaaβ…… format
|
|
982
|
+
- 10{ω^(……+ω^3×26+ω^2×26+ω×26+26)}10 ~ 10{ω^ω^ω}(10^sciThreshold): @αAaβ format
|
|
983
|
+
- 10{ω^ω^ω}(10^sciThreshold) ~ 10{ω^ω^(……ω^3×26+ω^2×26+ω×26+26)}10: @AaαEβ, @αAbβ, @αAaaβ…… format
|
|
984
|
+
- 10{ω^ω^(……+ω^3×26+ω^2×26+ω×26+26)}10 ~ 10{ω^ω^ω^ω}(10^sciThreshold): #αAaβ format
|
|
985
|
+
- 10{ω^ω^ω^ω}(10^sciThreshold) ~ 10{ω^ω^ω^(……ω^3×26+ω^2×26+ω×26+26)}10: #AaαEβ, #αAbβ, #αAaaβ…… format
|
|
986
|
+
|
|
987
|
+
…………
|
|
988
|
+
|
|
989
|
+
- 10{ω^ω^……^ω}10 ~ 10{ω^ω^…(10^sciThreshold ω^'s)…^ω}10: αεβformat
|
|
990
|
+
- 10{ω^ω^…(10^sciThreshold ω^'s)…^ω}10 ~ limit of metanum.js: εαEβformat
|
|
991
|
+
|
|
992
|
+
### format-metanum rules
|
|
993
|
+
|
|
994
|
+
- **Γ-canonical α/β (bisect law)**: the true α and β of a value v at letter Γ are recovered by bisecting 10{L}x = v on the engine's own smooth arrow curve (Γ = E,F,G,... single letters, L = level). α = 10^frac(x), β = floor(x), n operations of level L applied to a Γ^{L+1}-structured value collapse to ONE Γ^{L+1} with arg + n (e.g. F⁴(G(1.3796)) = G(5.3796)):
|
|
995
|
+
`format(arrow(3,4.1,3))` → `G1.161G897`,
|
|
996
|
+
`format(arrow(3,4.3,3))` → `1.285H8`,
|
|
997
|
+
`format(hardy(4166))` → `2.397G5`.
|
|
998
|
+
- **α appears at most once**, attached to the innermost value: `format(GE12)` → `G1.000E12`; hardy(1120) → `F4.398E13`. Once the innermost β reaches 10^sciThreshold the letter goes bare and β carries its own sci form.
|
|
999
|
+
- **At most 2 finite letter types** may appear in a display's hyper-op chain (VαEβ → VEαEβ → VαFβ → … → VαVβ, never another like VFαEβ), (AaαEβ → AaαFβ → … → AaαZβ → AaαAaβ, never another like AaFαEβ). A cascade that would spell more than two letter types spells only its top two levels and compresses the rest into the second letter's binary form. "bottom Γ repeation": 3{9}3 → `L2.376K2`, 3{10}3 → `M2.376L2`, 4{9}4 → `LLK3.550K3`, 5{9}5 → `LLLKK4.669K4`; repeatLetterThreshold+1 top repeats carry to the next letter instead (6{9}6 → `5.760M5`), and levels 22→21, 23→22 stay two-letter (`Y2.376X2`, `Z2.376Y2`), level ≥ 23 cascades display as the αΓβ polarize diagonal.
|
|
1000
|
+
### Binary-Letter-Canonical Forms — `format`, `formatSingleLetterType`, `formatFull`
|
|
1001
|
+
|
|
1002
|
+
`format(v, precision = 3)` returns the **binary-letter-canonical** display: at most
|
|
1003
|
+
**two** letter combinations, and the tail is always a binary form `αΓβ` (a decimal
|
|
1004
|
+
mantissa, the letter, an integer argument), optionally prefixed by repeats of the
|
|
1005
|
+
same letter (`ΓαΓβ`, `ΓΓαΓβ`, …). The leading run of the raw chain is preserved and
|
|
1006
|
+
the remainder is re-spelled with the next letter down:
|
|
1007
|
+
|
|
1008
|
+
```javascript
|
|
1009
|
+
format(MetaNum.arrow(4, 4, 4)); // "GGFF2.187F3" (GG + FF…F…; raw chain was GGFFE8.072E153)
|
|
1010
|
+
format(MetaNum.arrow(3, MetaNum.arrow(3, 4, 3), 3)); // "AaG2.045G2" (Aa + G…G…)
|
|
1011
|
+
format(MetaNum([[3638334640023.7783, 7625597484984, 0, 1, 1]])); // "HG2.045G2" (H + G…G…)
|
|
1012
|
+
format(MetaNum("AaGGFFE8.072E153")); // "AaGG3.340G3"
|
|
1013
|
+
format(MetaNum("AbGGFFE8.072E153")); // "AbGG3.340G3" (Ab / Ba / Bb / Aaa behave the same)
|
|
1014
|
+
format(MetaNum("AaaGF7.626E12")); // "AaaG2.045G2"
|
|
1015
|
+
```
|
|
1016
|
+
|
|
1017
|
+
`formatSingleLetterType(v, precision = 3)` spells the same value with **exactly one**
|
|
1018
|
+
letter combination, always ending on `αΓβ`. Plain values stay plain, and the
|
|
1019
|
+
repetition budget is `FORMAT_OPTIONS.repeatLetterThreshold` (default 3) for E..Z and
|
|
1020
|
+
`multiLetterRepeatThreshold` for the Aa band — a chain that would need more repeats
|
|
1021
|
+
advances to the next letter:
|
|
1022
|
+
|
|
1023
|
+
```javascript
|
|
1024
|
+
formatSingleLetterType(MetaNum(1e8)); // "100,000,000" (plain: below sciThreshold = 9)
|
|
1025
|
+
formatSingleLetterType(MetaNum(1e10)); // "1.000E10" (αEβ)
|
|
1026
|
+
formatSingleLetterType(MetaNum("1e308")) // "1.000E308" (β stayed plain)
|
|
1027
|
+
formatSingleLetterType(MetaNum("e1e308"))// "E1.000E308" (EαEβ)
|
|
1028
|
+
formatSingleLetterType(MetaNum("ee1e308"))//"EE1.000E308" (EEαEβ, the 3-repeat budget)
|
|
1029
|
+
formatSingleLetterType(MetaNum("eee1e308"))//"F1.000F308" (height 4 → the F band)
|
|
1030
|
+
formatSingleLetterType(MetaNum("G600")) // "1.000G600"
|
|
1031
|
+
formatSingleLetterType(MetaNum("Aa10")); // "1.000N10" (the first letter wins)
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
`formatFull(v, precision = 3)` is the unrestricted spelling: **no limit** on the
|
|
1035
|
+
number of letter combinations (the historical canonical chain). Use it when the raw
|
|
1036
|
+
cascade matters:
|
|
1037
|
+
|
|
1038
|
+
```javascript
|
|
1039
|
+
formatFull(MetaNum.arrow(4, 4, 4)); // "GGFFE8.072E153" (3 types)
|
|
1040
|
+
formatFull(MetaNum.arrow(3, MetaNum.arrow(3, 4, 3), 3)); // "AaGF7.626E12" (3 types)
|
|
1041
|
+
formatFull(MetaNum("AaGGFFE8.072E153")); // "AaGGFFE8.072E153" (4 types)
|
|
1042
|
+
format(MetaNum("AaGGFFE8.072E153")); // "AaGG3.340G3" (2 types)
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
**Canonical chain** (README “Letter-Canonical Forms”): every number > 1 is `Γα` for
|
|
1046
|
+
a unique α at each letter Γ, so the universal spelling walks
|
|
1047
|
+
|
|
1048
|
+
```
|
|
1049
|
+
普通数值 → αEβ → EαEβ → EEαEβ → αFβ → FαFβ → FFαFβ → αGβ → … → ZZαZβ → αAaβ → AaαAaβ → AaAaαAaβ → αAbβ → …
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
taking the FIRST letter combination in that order whose argument lands in the plain
|
|
1053
|
+
range. Because one letter application `Γ` is `E^level`, promoting a chain to a higher
|
|
1054
|
+
letter divides its E-count, which is how the repeat budget is honoured.
|
|
1055
|
+
|
|
1056
|
+
The very largest structural forms (full 20-row cascades and layer markers, e.g.
|
|
1057
|
+
`h31(10,3)`, `cuboiter(10,3)`) have no recoverable polarize triple; the single-letter
|
|
1058
|
+
helper then falls back to the ordinary display (still within the two-combination
|
|
1059
|
+
limit enforced by `format`).
|
|
1060
|
+
|
|
1061
|
+
### Precision budget (maxRows / maxCols)
|
|
1062
|
+
|
|
1063
|
+
Every hyperoperation is stored EXACTLY while it fits the array budget and approximately once it does not:
|
|
1064
|
+
|
|
1065
|
+
- exact capacity = maxRows+maxCols−2 finite hyperoperation levels:
|
|
1066
|
+
`arrow(x,L,z)` holds `r0 = [a0, a1, …, a(maxCols-1)]` (levels 0…maxCols−1)
|
|
1067
|
+
plus the ordinal rows `[a(level+1), level]` for levels
|
|
1068
|
+
maxCols … maxRows+maxCols−2 (maxRows−1 rows), so
|
|
1069
|
+
`arrow(10,39,10)` is exact at maxRows=maxCols=20 (r0 of 20 entries, 19 rows,
|
|
1070
|
+
top level 38) and `arrow(10,40,10)` is the first truncated value.
|
|
1071
|
+
- beyond the budget the expansion follows the truncation rule: keep the
|
|
1072
|
+
LARGEST maxRows−1 ordinal rows in array[1]…array[maxRows−1] sorted ascending,
|
|
1073
|
+
increment array[1][0] by 1 (the dropped lower chain collapses into one extra
|
|
1074
|
+
operation there) and default array[0] to [10]. This applies to arrow, BEAF
|
|
1075
|
+
and the rule-1…4 ordinal cascades alike
|
|
1076
|
+
(`iter(3,5)` → `[[10],[2,2,2,0,2,2],…,[1,2,2,2,2,2]]`).
|
|
1077
|
+
- layer ≥ 1 results are stored in STANDARD form: an ordinal row [count, k]
|
|
1078
|
+
whose level is the finite k merges into r0 (r0[k] += count) and the layer
|
|
1079
|
+
drops as far as it can, since a layer-L bracket β that is a finite
|
|
1080
|
+
ω-polynomial equals the layer-(L−1) value with the single row [1|β]:
|
|
1081
|
+
`cube(10,3)` `[[10],[1,3],[1,0,1]]` → `[[10,0,0,1],[1,0,1]]`;
|
|
1082
|
+
layer2 `[[5],[3,1]]` → `[[5,3]]` → layer1 `[[10],[1,5,3]]` = 10{ω^(ω*3+5)}10;
|
|
1083
|
+
layer3 `[[3]]` → layer2 `[[0,0,0,1]]` → layer1 `[[10],[1,0,0,0,1]]`
|
|
1084
|
+
= 10{ω^ω^3}10.
|
|
1085
|
+
|
|
1086
|
+
# Changelog
|
|
1087
|
+
|
|
1088
|
+
- 2026-10-24 v2.1.2 Fix(format): `format` now caps every display at TWO letter combinations with an αΓβ binary tail
|
|
1089
|
+
- 2026-10-18 v2.1.1 Fix: round-trip @Aa1/#Aa1 and alpha-Gamma sub-unit forms; fix(format): exact token form for non-integer multi-a layers and past multiLetterLimit
|
|
1090
|
+
- 2026-10-16 v2.1.0 Add hardy(x, base) and FGH(x, base), fix issue #15, #17, #19, #20, #21, #22
|
|
1091
|
+
- 2026-9-30 v2.0.2 Fix a lot of bugs e.g. hardy(non integer > 1000) throwing, hardy beyond the 1.8e308 range fails, format of "ω^n\*large numbers" fails, some FORMAT_OPTIONS not take effect
|
|
1092
|
+
- 2026-9-25 v2.0.1 Fix arrow(x,y,y) not being monotone in y and array except array[0][0] may be non-integer
|
|
1093
|
+
- 2026-9-15 v2.0.0 Add hyper-root & hyper-log, hardy function, fractional hyperoperation inputs, fix BEAF operation level and format
|
|
1094
|
+
- 2026-8-18 v1.4.0 Support hyper operation >MSI and fix format-metanum bugs
|
|
1095
|
+
- 2026-7-31 v1.3.0 Add format-metanum.js, fix basic operations, hyper operations and BEAF bugs
|
|
1096
|
+
- 2026-7-9 v1.2.0 Add more hyper operations up to ε₀, add BEAF operation and fix bugs
|
|
1097
|
+
- 2026-6-3 v1.1.0 Add support for very small numbers ,add more hyper operations and fix bugs
|
|
1098
|
+
- 2026-5-23 v1.0.0 Rewritten and add even more hyper operations
|
|
1099
|
+
- 2026-2-24 v0.4.0 Add hyper operations and extend fromString
|
|
1100
|
+
- 2026-2-11 v0.3.0 Reconstruct code and correct calculating functions
|
|
1101
|
+
- 2026-2-6 v0.2.0 New Metanum data structure with Cantor normal form
|
|
1102
|
+
- 2026-2-1 v0.1.0 First commit
|
|
1103
|
+
|