powiaina_num.js 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@ A JavaScript library that handles arithmetic for numbers as large as {10,9e15,1,
6
6
 
7
7
  This reaches level f<sub>ω<sup>3</sup>+1</sub>, which the operation [powiaination](https://googology.fandom.com/wiki/Powiaination) also is at, hence the name.
8
8
 
9
- Internally, it is represented as an sign, array, small, and layer. Sign is 1 or -1. . Layer is a non-negative integer.
9
+ Internally, it is represented as an sign, array, small, and layer. Sign is 1 or -1. . Layer is a non-negative integer.
10
10
 
11
11
  The operator interface is `interface {arrow: number; expans: number; megota: number; repeat: number;}`;
12
12
 
@@ -15,10 +15,10 @@ The array is an array types `Operator[]`
15
15
  when $$f(x) = \{10, 10, 10, 10, x\}$$
16
16
  $$g_{a,b,c}(x) = \text{a,b is not Infinity}=\{10,x,a,b,c\},\text{a is Infinity}=\{10,10,x,b,c\},\text{b is Infinity}=\{10,10,10,x,c\}$$
17
17
  $$o_x = \text{last }x\text{th operator of array} $$
18
- $$s_{ign} = \text{PN's sign property}$$
19
- $$l_{ayer} = \text{PN's layer property}$$
20
- $$e_{xp} = \text{if PN's small property is false, }e_{xp}=1,\text{Otherwise,}e_{xp}=-1$$
21
- They together respents $(s_{ign}\times f^{l_{ayer}} g_{o_1.arrow, o_1.expans, o_1.megota}^{o_1.repeat} g_{o_2.arrow, o_2.expans, o_2.megota}^{o_2.repeat} ...)^{e_{xp}}$
18
+ $$s*{ign} = \text{PN's sign property}$$
19
+ $$l*{ayer} = \text{PN's layer property}$$
20
+ $$e*{xp} = \text{if PN's small property is false, }e*{xp}=1,\text{Otherwise,}e*{xp}=-1$$
21
+ They together respents $(s*{ign}\times f^{l*{ayer}} g*{o*1.arrow, o_1.expans, o_1.megota}^{o_1.repeat} g*{o*2.arrow, o_2.expans, o_2.megota}^{o_2.repeat} ...)^{e*{xp}}$
22
22
 
23
23
  If arrow count or expans count is Infinite, the count replaces to the next operators.
24
24
 
@@ -32,8 +32,8 @@ The library exports a class,
32
32
  Create a PowiainaNum.js object like this:
33
33
 
34
34
  ```javascript
35
- import PowiainaNum from "powiaina_num.js"; // static import
36
- const { default: PowiainaNum } = await import("powiaina_num.js") // dynamic import
35
+ import PowiainaNum from "powiaina_num.js"; // static import
36
+ const { default: PowiainaNum } = await import("powiaina_num.js"); // dynamic import
37
37
 
38
38
  let a = new PowiainaNum(); // create PN.js number with NaN
39
39
  let b = new PowiainaNum(3); // create PN.js number with number 3
@@ -41,18 +41,27 @@ let c = new PowiainaNum("1e114514"); // create PN.js number with number 10^11451
41
41
 
42
42
  let d = new PowiainaNum(c); // create PN.js number from a PN.js number
43
43
 
44
- let e = new PowiainaNum([[0,23.2352],[1,2],[2,6],[3,0],[4,1],[5,4]]); // You can also use a pair number array which from ExpantaNum.js
45
-
46
- let f = new PowiainaNum("(10^^^)^114514 e1919810") // ExpantaNum.js string form
47
-
48
- let g = new PowiainaNum("10{!}e1919810") // 10{!} = 10{x}10, x points to e1919810, 10{!} = J in ExpantaNum.js
49
- let h = new PowiainaNum("10{1,2}ee114514") // {10, ee114514, 1, 2}
50
- let i = new PowiainaNum("10{1,514,114}ee114514") // {10, ee114514, 1, 514, 114}
51
- let j = new PowiainaNum("/10{1,514,114}ee114514") // Very small numbers ({10, ee114514, 1, 514, 114})^-1
52
- let k = new PowiainaNum("(e^114514)1919810") // break_eternity.js (e^x) form
44
+ let e = new PowiainaNum([
45
+ [0, 23.2352],
46
+ [1, 2],
47
+ [2, 6],
48
+ [3, 0],
49
+ [4, 1],
50
+ [5, 4],
51
+ ]); // You can also use a pair number array which from ExpantaNum.js
52
+
53
+ let f = new PowiainaNum("(10^^^)^114514 e1919810"); // ExpantaNum.js string form
54
+
55
+ let g = new PowiainaNum("10{!}e1919810"); // 10{!} = 10{x}10, x points to e1919810, 10{!} = J in ExpantaNum.js
56
+ let h = new PowiainaNum("10{1,2}ee114514"); // {10, ee114514, 1, 2}
57
+ let i = new PowiainaNum("10{1,514,114}ee114514"); // {10, ee114514, 1, 514, 114}
58
+ let j = new PowiainaNum("/10{1,514,114}ee114514"); // Very small numbers ({10, ee114514, 1, 514, 114})^-1
59
+ let k = new PowiainaNum("(e^114514)1919810"); // break_eternity.js (e^x) form
60
+ let k = new PowiainaNum("l0 s1 a[10,[114,514,1919,810]]"); // 0.1.x PowiainaNum.js .toString(1)
53
61
  ```
54
62
 
55
- In browser, you can download `dist/PowiainaNum.min.js` or use
63
+ In browser, you can download `dist/PowiainaNum.min.js` or use
64
+
56
65
  ```html
57
66
  <script src="https://unpkg.com/powiaina_num.js@alpha"></script>
58
67
  ```
@@ -88,9 +97,11 @@ a.eq(b); // a is equals to b
88
97
  Clone this project and then run `npm install`.
89
98
 
90
99
  ### Build project
100
+
91
101
  Run `npm run build` to build this project, js files will produce in `dist` directory.
92
102
 
93
103
  ### Test project
104
+
94
105
  Run `npm test` to test this project.
95
106
 
96
107
  ## Future ideas