Browse Source

more bigint stuff

Mike Schwörer 11 months ago
parent
commit
5a259397b1
Signed by: Mike Schwörer <mailport@mikescher.de> GPG Key ID: D3C7172E0A70F8CF
2 changed files with 58 additions and 0 deletions
  1. 29
    0
      bigint_add.b93
  2. 29
    0
      bigint_sub.b93

+ 29
- 0
bigint_add.b93 View File

@@ -0,0 +1,29 @@
1
+v        000000000000000000000000000002089876402499787337692720    // a       // [Ä]
2
+v        000000000000000000000000000003494850021680094023931305    // b       // [Ö]
3
+v        000000000000000000000000000000000000000000000000000000    // a+b     // [Ü]
4
+vXXX
5
+
6
+
7
+
8
+>013p">">:::Äg68*-\Ög68*-13g++:5v
9
+        |-8:-1 pÜ\+*86%+55p31/+5<
10
+      @$<
11
+
12
+
13
+// c = a*b
14
+
15
+// {Ä}  =>  a
16
+// {Ö}  =>  b
17
+// {Ü}  =>  c
18
+
19
+
20
+#$replace Ä -> 0
21
+#$replace Ö -> 1
22
+#$replace Ü -> 2
23
+
24
+#$watch[1,3]:int = carry
25
+
26
+
27
+
28
+62     =>   ">"
29
+'0'    =>   68*      (= 48)

+ 29
- 0
bigint_sub.b93 View File

@@ -0,0 +1,29 @@
1
+v        000000000000000000000000000012089876402499787337692720    // a       // [Ä]
2
+v        000000000000000000000000000003494850021680094023931305    // b       // [Ö]
3
+v        000000000000000000000000000000000000000000000000000000    // a-b     // [Ü]
4
+vXXX
5
+
6
+
7
+
8
+>013p">">:::Äg68*-\Ög68*--13g-:0v
9
+        |-8:-1pÜ\+*86+*+55p31:`\<
10
+      @$<
11
+
12
+
13
+// c = a*b
14
+
15
+// {Ä}  =>  a
16
+// {Ö}  =>  b
17
+// {Ü}  =>  c
18
+
19
+
20
+#$replace Ä -> 0
21
+#$replace Ö -> 1
22
+#$replace Ü -> 2
23
+
24
+#$watch[1,3]:int = carry
25
+
26
+
27
+
28
+62     =>   ">"
29
+'0'    =>   68*      (= 48)

Loading…
Cancel
Save