metanum 1.3.0 → 2.0.0

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