metanum 1.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/.gitattributes +1 -0
- package/LICENSE +21 -0
- package/README.md +583 -0
- package/metanum.js +3789 -0
- package/package.json +23 -0
- package/test-interface.html +45 -0
- package/test_mixed.js +107 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
text=crlf
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dlsdl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
# MetaNum
|
|
2
|
+
|
|
3
|
+
- MetaNum v1.0 by dlsdl
|
|
4
|
+
|
|
5
|
+
A huge number library holding up to X↑↑X&9e15.
|
|
6
|
+
|
|
7
|
+
This reaches level f<sub>ε₀</sub>, which is the limit of well-defined expressions in BEAF, hence the name.
|
|
8
|
+
|
|
9
|
+
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:
|
|
10
|
+
|
|
11
|
+
- **sign**: 1 (positive) or -1 (negative)
|
|
12
|
+
- **layer**: Non-negative integer representing the ω exponent tower height
|
|
13
|
+
- **array**: 2-dimensional array `[[r0, e, f, g, ...], [count, level], ...]` where the first row holds the base value and finite hyper-operation exponents, and subsequent rows hold ordinal terms
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install metanum
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Creating Instances
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
// From a plain number
|
|
25
|
+
const a = new MetaNum(42);
|
|
26
|
+
const b = MetaNum.fromNumber(-3.14);
|
|
27
|
+
|
|
28
|
+
// From a string (supports scientific notation, hyper-operations, letter notation, brackets, etc.)
|
|
29
|
+
const c = new MetaNum("1.5e308");
|
|
30
|
+
const d = MetaNum.fromString("10^^5"); // tetration: 10^^5
|
|
31
|
+
const e = MetaNum.fromString("E100#2"); // Hyper-E: 10^10^100 (googolplex)
|
|
32
|
+
const f = MetaNum.fromString("GF^2E^3 123"); // letter notation
|
|
33
|
+
const g = MetaNum.fromString("F3 100"); // GF^2E^3 = 10↑↑↑10↑↑10↑↑10↑10↑10↑123
|
|
34
|
+
const h = MetaNum.fromString("[[10], [1, 3]]"); // bracket notation
|
|
35
|
+
|
|
36
|
+
// From an array
|
|
37
|
+
const i = MetaNum.fromArray([3.14, 1, 2]); // [[3.14, 1, 2]]
|
|
38
|
+
const j = MetaNum.fromArray([10], 1, 1); // layer 1
|
|
39
|
+
|
|
40
|
+
// From an object / JSON
|
|
41
|
+
const k = MetaNum.fromJSON('{"sign":1,"array":[[42]],"layer":0}');
|
|
42
|
+
const l = MetaNum.fromObject({ sign: 1, array: [[1, 2]], layer: 0 });
|
|
43
|
+
|
|
44
|
+
// From BigInt
|
|
45
|
+
const m = MetaNum.fromBigInt(10n ** 100n);
|
|
46
|
+
|
|
47
|
+
// From Hyper-E notation
|
|
48
|
+
const n = MetaNum.fromHyperE("EE100");
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Constants
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
MetaNum.ZERO // 0
|
|
55
|
+
MetaNum.ONE // 1
|
|
56
|
+
MetaNum.TWO // 2
|
|
57
|
+
MetaNum.TEN // 10
|
|
58
|
+
MetaNum.E // Math.E
|
|
59
|
+
MetaNum.LN2 // Math.LN2
|
|
60
|
+
MetaNum.LN10 // Math.LN10
|
|
61
|
+
MetaNum.PI // π
|
|
62
|
+
MetaNum.SQRT2 // √2
|
|
63
|
+
MetaNum.MAX_SAFE_INTEGER // 9007199254740991
|
|
64
|
+
MetaNum.NaN // NaN
|
|
65
|
+
MetaNum.POSITIVE_INFINITY // Infinity
|
|
66
|
+
MetaNum.NEGATIVE_INFINITY // -Infinity
|
|
67
|
+
MetaNum.GRAHAMS_NUMBER // Graham's number (approximation)
|
|
68
|
+
MetaNum.TRITRI // 3↑↑↑3 = 3^^^3
|
|
69
|
+
MetaNum.QqQe308 // QqQe308 (for incremental games)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Basic Usage
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
// Arithmetic
|
|
76
|
+
const sum = MetaNum.add(15, 27); // 42 (static)
|
|
77
|
+
const diff = new MetaNum(27).sub(15); // 12 (instance)
|
|
78
|
+
const product = new MetaNum(15).mul(27); // 405
|
|
79
|
+
const quotient = new MetaNum(27).div(15); // 1.8
|
|
80
|
+
|
|
81
|
+
// Power & roots
|
|
82
|
+
new MetaNum(2).pow(10); // 1024
|
|
83
|
+
new MetaNum(100).sqrt(); // 10
|
|
84
|
+
new MetaNum(27).cbrt(); // 3
|
|
85
|
+
new MetaNum(8).root(3); // 2
|
|
86
|
+
new MetaNum(10).exp(); // e^10
|
|
87
|
+
|
|
88
|
+
// Logarithms
|
|
89
|
+
new MetaNum(100).log10(); // 2
|
|
90
|
+
new MetaNum(8).log(2); // 3
|
|
91
|
+
new MetaNum(Math.E).ln(); // 1
|
|
92
|
+
|
|
93
|
+
// Comparison
|
|
94
|
+
const x = new MetaNum(10), y = new MetaNum(20);
|
|
95
|
+
x.lt(y); // true
|
|
96
|
+
x.gt(y); // false
|
|
97
|
+
x.eq(y); // false
|
|
98
|
+
x.lte(y); // true
|
|
99
|
+
x.gte(y); // false
|
|
100
|
+
x.neq(y); // true
|
|
101
|
+
x.min(y); // 10
|
|
102
|
+
x.max(y); // 20
|
|
103
|
+
|
|
104
|
+
// Comparison with tolerance
|
|
105
|
+
x.eq_tolerance(new MetaNum(10.0001), 1e-3); // true
|
|
106
|
+
x.cmp_tolerance(y, 1e-7); // -1
|
|
107
|
+
|
|
108
|
+
// Sign checks
|
|
109
|
+
x.ispos(); // true
|
|
110
|
+
x.isneg(); // false
|
|
111
|
+
x.isNaN(); // false
|
|
112
|
+
x.isFinite(); // true
|
|
113
|
+
x.isint(); // true
|
|
114
|
+
|
|
115
|
+
// Rounding
|
|
116
|
+
new MetaNum(3.7).floor(); // 3
|
|
117
|
+
new MetaNum(3.2).ceil(); // 4
|
|
118
|
+
new MetaNum(3.5).round(); // 4
|
|
119
|
+
|
|
120
|
+
// Reciprocal & absolute
|
|
121
|
+
new MetaNum(4).rec(); // 0.25
|
|
122
|
+
new MetaNum(-5).abs(); // 5
|
|
123
|
+
new MetaNum(5).neg(); // -5
|
|
124
|
+
|
|
125
|
+
// Factorial & Gamma
|
|
126
|
+
new MetaNum(5).fact(); // 120
|
|
127
|
+
new MetaNum(0.5).gamma(); // Γ(0.5) = √π
|
|
128
|
+
|
|
129
|
+
// Modulo
|
|
130
|
+
new MetaNum(10).mod(3); // 1
|
|
131
|
+
|
|
132
|
+
// Lambert W function
|
|
133
|
+
new MetaNum(1).lambertw(); // Ω ≈ 0.5671
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Hyper-Operations (Tetration & Beyond)
|
|
137
|
+
|
|
138
|
+
```javascript
|
|
139
|
+
// Tetration: a^^b
|
|
140
|
+
new MetaNum(2).tetr(3); // 2^^3 = 2^2^2 = 16
|
|
141
|
+
new MetaNum(2).tetr(4); // 2^^4 = 65536
|
|
142
|
+
MetaNum.tetr(2, 5); // 2^^5
|
|
143
|
+
|
|
144
|
+
// With payload (offset)
|
|
145
|
+
new MetaNum(10).tetr(2, new MetaNum(5)); // 10^^2 with payload 5
|
|
146
|
+
|
|
147
|
+
// Pentation: a^^^b
|
|
148
|
+
new MetaNum(2).pent(3); // 2^^^3
|
|
149
|
+
|
|
150
|
+
// General arrow notation: a↑^n b
|
|
151
|
+
new MetaNum(2).arrow(3)(4); // 2↑↑↑4 (pentation)
|
|
152
|
+
MetaNum.arrow(3, 4, 3); // 3↑↑↑↑3 = g_1
|
|
153
|
+
|
|
154
|
+
// Chain notation
|
|
155
|
+
new MetaNum(2).chain(4, 3); // 2→4→3
|
|
156
|
+
|
|
157
|
+
// Aperiation: a↑^a a
|
|
158
|
+
new MetaNum(2).aper(3); // 2↑↑↑2 = 4
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Super-logarithm & Super-root
|
|
162
|
+
|
|
163
|
+
```javascript
|
|
164
|
+
// Super-logarithm (inverse of tetration)
|
|
165
|
+
new MetaNum(16).slog(2); // slog_2(16) = 3
|
|
166
|
+
new MetaNum(65536).slog(); // slog_10(65536) ≈ 2
|
|
167
|
+
|
|
168
|
+
// Super-square-root
|
|
169
|
+
new MetaNum(27).ssrt(); // ssqrt(27)
|
|
170
|
+
|
|
171
|
+
// Linear super-root
|
|
172
|
+
new MetaNum(100).linear_sroot(3); // ³ss̅r̅t̅(100)
|
|
173
|
+
|
|
174
|
+
// Layer arithmetic
|
|
175
|
+
new MetaNum(10).layeradd(3); // add 3 layers of exponentiation
|
|
176
|
+
new MetaNum(10).layeradd10(3); // 10^^3 (explicit base 10)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Diagonalization / Expansion Hierarchy
|
|
180
|
+
|
|
181
|
+
These functions represent iterated diagonalizations at increasing ordinal levels:
|
|
182
|
+
|
|
183
|
+
```javascript
|
|
184
|
+
const x = new MetaNum(10);
|
|
185
|
+
|
|
186
|
+
// Level ω+1: iterate aperiate
|
|
187
|
+
x.expande(3); // expande(x, 3) = iterated aperiate
|
|
188
|
+
|
|
189
|
+
// Level ω*2+1: iterate expande
|
|
190
|
+
x.multiexpande(3); // multiexpande(x, 3)
|
|
191
|
+
|
|
192
|
+
// Level ω*3+1: iterate multiexpande
|
|
193
|
+
x.powerexpande(3);
|
|
194
|
+
|
|
195
|
+
// Level ω^ω: diagonalize ω^x operations
|
|
196
|
+
x.aperioexpansion(3); // apea(x, 3)
|
|
197
|
+
|
|
198
|
+
// Level ω^ω+1: iterate aperioexpansion
|
|
199
|
+
x.explode(3); // expl(x, 3)
|
|
200
|
+
|
|
201
|
+
// Level ω^ω*2: diagonalize explode iterations
|
|
202
|
+
x.multiexplode(3); // muel(x, 3)
|
|
203
|
+
|
|
204
|
+
// Level ω^(ω+1): diagonalize ω^ω*y
|
|
205
|
+
x.aperioexplode(3); // apel(x, 3)
|
|
206
|
+
|
|
207
|
+
// Level ω^(ω+1)+1: iterate aperioexplode
|
|
208
|
+
x.detonate(3); // deto(x, 3)
|
|
209
|
+
|
|
210
|
+
// Level ω^(ω*2): diagonalize ω^(ω+1)*y
|
|
211
|
+
x.aperionate(3); // apeo(x, 3)
|
|
212
|
+
|
|
213
|
+
// Level ω^(ω*2)+1: iterate aperionate
|
|
214
|
+
x.megote(3); // mego(x, 3)
|
|
215
|
+
|
|
216
|
+
// Level ω^(ω*2+ω): diagonalize ω^(ω*2)*y
|
|
217
|
+
x.aperimegote(3); // apmg(x, 3)
|
|
218
|
+
|
|
219
|
+
// Level ω^(ω*2+ω)+1: iterate aperimegote
|
|
220
|
+
x.megoexpande(3); // mgea(x, 3)
|
|
221
|
+
|
|
222
|
+
// Level ω^(ω^2): diagonalize ω^(ω*2)
|
|
223
|
+
x.megoaperionation(3); // mgao(x, 3)
|
|
224
|
+
|
|
225
|
+
// Level ω^(ω^2)+1: iterate megoaperionation
|
|
226
|
+
x.gigote(3); // gigo(x, 3)
|
|
227
|
+
|
|
228
|
+
// Level ω^(ω^3): diagonalize ω^(ω^2)*y
|
|
229
|
+
x.aperiatotion(3); // apat(x, 3)
|
|
230
|
+
|
|
231
|
+
// Level ω^(ω^3)+1: iterate aperiatotion
|
|
232
|
+
x.powiainate(3); // pwan(x, 3)
|
|
233
|
+
|
|
234
|
+
// Level ω^(ω^ω): universal diagonalizer (generalizes to arbitrary ordinals)
|
|
235
|
+
x.iter(3); // iter(x, 3)
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Inverse Operations
|
|
239
|
+
|
|
240
|
+
Each expansion operation has a corresponding inverse for decrementing ordinal structure:
|
|
241
|
+
|
|
242
|
+
```javascript
|
|
243
|
+
x.i_aper(z) // inverse of aperiate
|
|
244
|
+
x.i_expa(z) // inverse of expande
|
|
245
|
+
x.i_muea(z) // inverse of multiexpande
|
|
246
|
+
x.i_poea(z) // inverse of powerexpande
|
|
247
|
+
x.i_apea(z) // inverse of aperioexpansion
|
|
248
|
+
x.i_expl(z) // inverse of explode
|
|
249
|
+
x.i_muel(z) // inverse of multiexplode
|
|
250
|
+
x.i_apel(z) // inverse of aperioexplode
|
|
251
|
+
x.i_deto(z) // inverse of detonate
|
|
252
|
+
x.i_apeo(z) // inverse of aperionate
|
|
253
|
+
x.i_mego(z) // inverse of megote
|
|
254
|
+
x.i_apmg(z) // inverse of aperimegote
|
|
255
|
+
x.i_mgea(z) // inverse of megoexpande
|
|
256
|
+
x.i_mgao(z) // inverse of megoaperionation
|
|
257
|
+
x.i_gigo(z) // inverse of gigote
|
|
258
|
+
x.i_apat(z) // inverse of aperiatotion
|
|
259
|
+
x.i_pwan(z) // inverse of powiainate
|
|
260
|
+
x.i_ite(z) // inverse of iter
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Layer & Serialization
|
|
264
|
+
|
|
265
|
+
```javascript
|
|
266
|
+
// Layer manipulation
|
|
267
|
+
new MetaNum(10).layerUp(); // promote to layer+1
|
|
268
|
+
new MetaNum(10).layerDown(); // demote to layer-1
|
|
269
|
+
|
|
270
|
+
// Output formats
|
|
271
|
+
new MetaNum(123).toString(); // "123"
|
|
272
|
+
new MetaNum(1e308).toString(); // "E308"
|
|
273
|
+
new MetaNum(100).toNumber(); // 100
|
|
274
|
+
new MetaNum(100).valueOf(); // "100"
|
|
275
|
+
new MetaNum(100).toFixed(2); // "100.00"
|
|
276
|
+
new MetaNum(100).toExponential(2); // "1.00e+2"
|
|
277
|
+
new MetaNum(100).toPrecision(3); // "100"
|
|
278
|
+
new MetaNum(100).toHyperE(); // "100"
|
|
279
|
+
new MetaNum(100).toStringWithDecimalPlaces(4); // "100.0000"
|
|
280
|
+
new MetaNum(100).toJSON(); // {sign:1, array:[[100]], layer:0}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Utility Functions
|
|
284
|
+
|
|
285
|
+
```javascript
|
|
286
|
+
// Binomial coefficient
|
|
287
|
+
new MetaNum(10).choose(3); // C(10,3) = 120
|
|
288
|
+
|
|
289
|
+
// Hyper-operation
|
|
290
|
+
MetaNum.hyper(4, 2, 3); // 2^^3 = 16 (n=4 means tetration)
|
|
291
|
+
|
|
292
|
+
// Geometric series
|
|
293
|
+
MetaNum.sumGeometricSeries(5, 1, 2); // 1+2+4+8+16 = 31
|
|
294
|
+
MetaNum.affordGeometricSeries(100, 1, 2, 0);
|
|
295
|
+
|
|
296
|
+
// Arithmetic series
|
|
297
|
+
MetaNum.sumArithmeticSeries(5, 1, 2); // 1+3+5+7+9 = 25
|
|
298
|
+
MetaNum.affordArithmeticSeries(100, 1, 2, 0);
|
|
299
|
+
|
|
300
|
+
// Configuration
|
|
301
|
+
MetaNum.config({ maxRows: 200, maxCols: 200, maxArrow: 1e6, debug: 1 });
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Mathematical Background
|
|
305
|
+
|
|
306
|
+
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:
|
|
307
|
+
|
|
308
|
+
- ω represents the first infinite ordinal
|
|
309
|
+
- ω^ω represents ω raised to the power of ω
|
|
310
|
+
- ε₀ is the limit of ω, ω^ω, ω^ω^ω, ...
|
|
311
|
+
|
|
312
|
+
For more information, see: <https://en.wikipedia.org/wiki/Ordinal_arithmetic>
|
|
313
|
+
|
|
314
|
+
The layer parameter indicates the height of the ω exponent tower, allowing representation of increasingly large ordinals.
|
|
315
|
+
|
|
316
|
+
## dlsdl's Letter Notation
|
|
317
|
+
|
|
318
|
+
Modified from PsiCubed's letter notation(<https://googology.fandom.com/wiki/User_blog:PsiCubed2/My_Letter_Notation>)
|
|
319
|
+
|
|
320
|
+
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:
|
|
321
|
+
|
|
322
|
+
(1) Any number has a unique standard representation in the system.
|
|
323
|
+
|
|
324
|
+
(2) Given the standard representation of two numbers, one can immediately tell which one is larger without any calculations.
|
|
325
|
+
|
|
326
|
+
### The format of the proposed notation
|
|
327
|
+
|
|
328
|
+
Our final notation will look like this:
|
|
329
|
+
|
|
330
|
+
\[symbol]\[letter]\[number]
|
|
331
|
+
|
|
332
|
+
where \[symbol] can be one of the following: empty,!,@,#,$,%,&,……
|
|
333
|
+
|
|
334
|
+
where \[letter] can be one of the following: E,F,G,H,……,Aa,Ab,Ac,……,Ba,Bb,……,Aaa,……
|
|
335
|
+
|
|
336
|
+
and \[number] can be any positive real number (nonintegers included).
|
|
337
|
+
|
|
338
|
+
### The First Levels: A Continuous version of Knuth Arrows
|
|
339
|
+
|
|
340
|
+
We'll define:
|
|
341
|
+
|
|
342
|
+
Eα=10^α
|
|
343
|
+
|
|
344
|
+
Fα = EEEE...EEE(10^frac(α)) with int(α) E's
|
|
345
|
+
|
|
346
|
+
Gα = FFFF...FFF(10^frac(α)) with int(α) F's
|
|
347
|
+
|
|
348
|
+
Hα = GGGG...GGG(10^frac(α)) with int(α) G's
|
|
349
|
+
|
|
350
|
+
then we'll have I,J,K,... to Z ,each with the same definition as Hα.
|
|
351
|
+
|
|
352
|
+
Note that according to these definitions we have:
|
|
353
|
+
|
|
354
|
+
(1) For α≤1: Eα = Fα = Gα = Hα = ... = Zα = 10^α
|
|
355
|
+
|
|
356
|
+
(2) For any integer β: Eβ = 10↑β, Fβ = 10↑↑β, Gβ = 10↑↑↑β, Hβ = 10↑↑↑↑β
|
|
357
|
+
|
|
358
|
+
the γ-th letter β represents 10(γ-4 arrows)β
|
|
359
|
+
|
|
360
|
+
So the above definitions are indeed an extention of Knuth arrows to nonintegers.
|
|
361
|
+
|
|
362
|
+
### Letter-Canonical Forms
|
|
363
|
+
|
|
364
|
+
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:
|
|
365
|
+
|
|
366
|
+
α = Γβ.
|
|
367
|
+
|
|
368
|
+
And we call "Γβ" the Γ-Canonical Form of the number α.
|
|
369
|
+
|
|
370
|
+
For example, the E-Canonical form of 1000 is E3:
|
|
371
|
+
|
|
372
|
+
E3 = 10^3 = 1000.
|
|
373
|
+
|
|
374
|
+
And the F-Canonical form of 1000 is about F1.47712:
|
|
375
|
+
|
|
376
|
+
F1.47712 = E(10^0.47712) ≈ E3 = 10^3 = 1000.
|
|
377
|
+
|
|
378
|
+
### Binary-Letter-Canonical Forms
|
|
379
|
+
|
|
380
|
+
To recreate ordinary scientific notation, we'll define a binary version of the letter functions like this:
|
|
381
|
+
|
|
382
|
+
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:
|
|
383
|
+
|
|
384
|
+
αΓβ = Γ(β+log(α))
|
|
385
|
+
|
|
386
|
+
For Example:
|
|
387
|
+
|
|
388
|
+
7E3 = E(3+log(7)) = 10^(3+log(7)) = 7\*10^3 = 7000
|
|
389
|
+
|
|
390
|
+
7F3 = F(3+log(7)) = EEE(10^log(7)) = EEE7 = 10^10^10^7
|
|
391
|
+
|
|
392
|
+
So αEβ is nothing more than ordinary scientific notation.
|
|
393
|
+
|
|
394
|
+
And αFβ is a power tower of β 10's topped by an α.
|
|
395
|
+
|
|
396
|
+
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 α.
|
|
397
|
+
|
|
398
|
+
### Defining Aa - The First Diagonalization
|
|
399
|
+
|
|
400
|
+
In the previous section we've defined an infinite sequence of functions, so we can diagonalize over them:
|
|
401
|
+
|
|
402
|
+
let 1|α = Eα, 2|α = Fα, 3|α = Gα, ..., 22|α = Zα.
|
|
403
|
+
|
|
404
|
+
we had: Aaα = α|10.
|
|
405
|
+
|
|
406
|
+
So Aa is comparable to f\_ω\_(n) in the FGH.
|
|
407
|
+
|
|
408
|
+
But there are a couple of problems here:
|
|
409
|
+
|
|
410
|
+
(1) α|10 isn't yet defined for noninteger α.
|
|
411
|
+
|
|
412
|
+
(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:
|
|
413
|
+
|
|
414
|
+
(i) α|10 = (int(α)+1)|2\*5^frac(α)
|
|
415
|
+
|
|
416
|
+
(ii) For α<2: Aaα = Gα
|
|
417
|
+
|
|
418
|
+
(iii) For α≥2: Aaα = α|10
|
|
419
|
+
|
|
420
|
+
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.
|
|
421
|
+
|
|
422
|
+
### Ab,Ac,Ad,...,Az and their Universal Canonical Forms
|
|
423
|
+
|
|
424
|
+
The definitions of Ab,Ac,Ad,...,Az are simple enough:
|
|
425
|
+
|
|
426
|
+
Abα = AaAa...AaAa(10^frac(α)) with int(α) Aa's
|
|
427
|
+
|
|
428
|
+
Acα = AbAb...AbAb(10^frac(α)) with int(α) Ab's
|
|
429
|
+
|
|
430
|
+
then we have Ad,Ae,...,Az, each with the same definition as Ab and Ac.
|
|
431
|
+
|
|
432
|
+
And that's it. So A(the β+1-th letter) is comparable to f\_ω+β\_(n) in the FGH.
|
|
433
|
+
|
|
434
|
+
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.
|
|
435
|
+
|
|
436
|
+
Moreover, since Aa10=Ab2 and Ab10=Ac2, we can extend our definition of the "Universal Canonical Form" up to Az10:
|
|
437
|
+
|
|
438
|
+
(1) if α<100 (that's E2) then we write down the E-Canonical Form of α.
|
|
439
|
+
|
|
440
|
+
(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.
|
|
441
|
+
|
|
442
|
+
### Defining from Ba to Bz
|
|
443
|
+
|
|
444
|
+
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:
|
|
445
|
+
|
|
446
|
+
(1,0)|α = Aaα
|
|
447
|
+
|
|
448
|
+
(1,β+1)|α = (1,β)|(1,β)|...|(1,β)|10^frac(α) with int(α) (1,β)'s
|
|
449
|
+
|
|
450
|
+
And define Baα in a way similar to Aaα:
|
|
451
|
+
|
|
452
|
+
(i) (1,α)|10 = (1,int(α)+1)|2\*5^frac(α)
|
|
453
|
+
|
|
454
|
+
(ii) For α<2: Baα = (1,3)|α
|
|
455
|
+
|
|
456
|
+
(iii) For α≥2: Baα = (1,α)|10
|
|
457
|
+
|
|
458
|
+
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.
|
|
459
|
+
|
|
460
|
+
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.
|
|
461
|
+
|
|
462
|
+
### A Supporting Array Notation and Aaa
|
|
463
|
+
|
|
464
|
+
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):
|
|
465
|
+
|
|
466
|
+
(i) (0,1)|α = 10^α
|
|
467
|
+
|
|
468
|
+
(ii) (β,γ+1)|α = (β,γ)|(β,γ)|...|(β,γ)|10^frac(α) with int(α) (β,γ)'s
|
|
469
|
+
|
|
470
|
+
(iii) (β,α)|10 = (β,int(α)+1)|2\*5^frac(α)
|
|
471
|
+
|
|
472
|
+
(iv) For α<2: (β+1,0)|α = (β,3)|α
|
|
473
|
+
|
|
474
|
+
(v) For α≥2: (β+1,0)|α = (β,α)|10
|
|
475
|
+
|
|
476
|
+
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)|α.
|
|
477
|
+
|
|
478
|
+
So QqQe308 is about f\_ω17+16\_(f\_ω17+4\_(308)).
|
|
479
|
+
|
|
480
|
+
And with this new supporting notation we can now to define Aaaα:
|
|
481
|
+
|
|
482
|
+
(i) For α<2: Aaaα = (2,1)|α
|
|
483
|
+
|
|
484
|
+
(ii) For α≥2: Aaaα = (int(α),10\*frac(α))|10
|
|
485
|
+
|
|
486
|
+
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
|
|
487
|
+
|
|
488
|
+
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.
|
|
489
|
+
|
|
490
|
+
### Arrays with more than two variable, and !Aa
|
|
491
|
+
|
|
492
|
+
Array notations can be easily extended to a multivariable array notation, like so:
|
|
493
|
+
|
|
494
|
+
(i) For α≤1: (anything)|α = 10^α
|
|
495
|
+
|
|
496
|
+
(ii) (β,γ,δ,...,ν+1)|α = (β,γ,δ,...,ν)|(β,γ,δ,...,ν)|...|(β,γ,δ,...,ν)|10^frac(α) with int(α) (β,γ,δ,...,ν)'s
|
|
497
|
+
|
|
498
|
+
(iii) (β,γ,δ,...,ν,α)|10 = (β,γ,δ,...,ν,int(α+1))|2\*5^frac(α)
|
|
499
|
+
|
|
500
|
+
(iv) For 1<α<2: (β,γ,δ,...,μ+1,<κ zeros>)|α = (β,γ,δ,...,μ,2,<κ-1 zeros>)|10^(α-1)
|
|
501
|
+
|
|
502
|
+
(v) For α≥2: (β,γ,δ,...,μ+1,<κ zeros>)|α = (β,γ,δ,...,μ,α,<κ-1 zeros>)|10
|
|
503
|
+
|
|
504
|
+
(vi) (β,γ,δ,...,α,<κ zeros>)|10 = (β,γ,δ,...,int(α),frac(α)\*10,<κ-1 zeros>)|10
|
|
505
|
+
|
|
506
|
+
(vii) (0,...,0,β,γ,δ,...,μ)|α = (β,γ,δ,...,μ)|α
|
|
507
|
+
|
|
508
|
+
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.
|
|
509
|
+
|
|
510
|
+
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:
|
|
511
|
+
|
|
512
|
+
- (114,514,1.9198,0,0,0,0)|10 = (114,514,1,9,1,9,8)|10.
|
|
513
|
+
|
|
514
|
+
Now, all that is left to do is to define !Aa, which is about f\_ω^ω\_(10) in the FGH.
|
|
515
|
+
|
|
516
|
+
For α<2: !Aaα = (1,0,1)|α
|
|
517
|
+
|
|
518
|
+
For α≥2: !Aaα = (10^frac(α),0,...,0)|10 with int(α) zeros.
|
|
519
|
+
|
|
520
|
+
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:
|
|
521
|
+
|
|
522
|
+
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
|
|
523
|
+
|
|
524
|
+
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.
|
|
525
|
+
|
|
526
|
+
### Higher dimensional arrays and @Aa
|
|
527
|
+
|
|
528
|
+
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.
|
|
529
|
+
|
|
530
|
+
(i) Other rules are the same from linear array notation
|
|
531
|
+
|
|
532
|
+
(ii) (β,γ,δ,...,μ+1\[1]0,ζ)|α = (β,γ,δ,...,μ\[1]1,0,0,ζ)|10^(x-1) for 1\<x<2
|
|
533
|
+
|
|
534
|
+
(iii) (β,γ,δ,...,μ+1\[1]0,ζ)|α = (β,γ,δ,...,μ\[1]10^frac(x),0,...,0,ζ)|10 with int(x) 0's for x=>2
|
|
535
|
+
|
|
536
|
+
(iv) (β,γ,δ,...,α\[1]0,ζ)|10, κ = frac(α)\*10
|
|
537
|
+
|
|
538
|
+
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
|
|
539
|
+
|
|
540
|
+
(v) (...\[1]0,...,0,β,γ...)|α = (...\[1]β,γ...)|α
|
|
541
|
+
|
|
542
|
+
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.
|
|
543
|
+
|
|
544
|
+
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.
|
|
545
|
+
|
|
546
|
+
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.
|
|
547
|
+
|
|
548
|
+
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.
|
|
549
|
+
|
|
550
|
+
Now, all that is left to do is to define @Aa, which is about f\_ω^ω^ω\_(10) in the FGH.
|
|
551
|
+
|
|
552
|
+
For α<2: @Aaα = (1\[1,0,0]0)|α
|
|
553
|
+
|
|
554
|
+
For α≥2: @Aaα = (1\[10^frac(α),0,...,0]0)|10 with int(α) zeros.
|
|
555
|
+
|
|
556
|
+
### Nested arrays and more symbols
|
|
557
|
+
|
|
558
|
+
The Definiton of more symbols is similar to the definition of @Aa.
|
|
559
|
+
|
|
560
|
+
\#Aa \~ f\_ω^ω^ω^ω\_(10)
|
|
561
|
+
|
|
562
|
+
$Aa \~ f\_ω^ω^ω^ω^ω\_(10)
|
|
563
|
+
|
|
564
|
+
And there are more symbols : % & \~ < > ? and symbol combinations like !!, !@, !#, @!.
|
|
565
|
+
|
|
566
|
+
Then we can define (the β-th symbol or symbol combination)Aa = f\_ω^ω^...^ω(β+1 ω's)\_(10)
|
|
567
|
+
|
|
568
|
+
### Definition of the final letter: ε
|
|
569
|
+
|
|
570
|
+
ε represents exponent tower layers of ω, and it is comparable to f\_ε0\_(10) in the FGH.
|
|
571
|
+
|
|
572
|
+
αεβ \~ f\_ω^ω^...^ω(β ω's)\_(α)
|
|
573
|
+
|
|
574
|
+
#### Using dlsdl's letter notation, the biggest number we can define in Metanum is about ε1.797e308.
|
|
575
|
+
|
|
576
|
+
## Update log
|
|
577
|
+
|
|
578
|
+
- 2026-5-23 v1.0 Rewritten and add even more hyper operations
|
|
579
|
+
- 2026-2-24 v0.4 Add hyper operations and extend fromString
|
|
580
|
+
- 2026-2-11 v0.3 Reconstruct code and correct calculating functions
|
|
581
|
+
- 2026-2-6 v0.2 New Metanum data structure with Cantor normal form
|
|
582
|
+
- 2026-2-1 v0.1 First commit
|
|
583
|
+
|