Browse Source

bigint_mult (long multiplication)

Mike Schwörer 11 months ago
parent
commit
587aa9ecd5
Signed by: Mike Schwörer <mailport@mikescher.de> GPG Key ID: D3C7172E0A70F8CF
1 changed files with 36 additions and 0 deletions
  1. 36
    0
      bigint_mult.b93

+ 36
- 0
bigint_mult.b93 View File

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

Loading…
Cancel
Save