-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
99 lines (65 loc) · 3.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Big Integer Computation | BigInteger</title>
<meta name="generator" content="Jekyll v3.7.4" />
<meta property="og:title" content="Big Integer Computation" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="for big integer computation" />
<meta property="og:description" content="for big integer computation" />
<link rel="canonical" href="https://swlai.github.io/BigInteger/" />
<meta property="og:url" content="https://swlai.github.io/BigInteger/" />
<meta property="og:site_name" content="BigInteger" />
<meta name="google-site-verification" content="zchKcTu_msGF2-7HKq2zAYEf8LN14ZBOHCCiwy5KWos" />
<script type="application/ld+json">
{"@type":"WebSite","headline":"Big Integer Computation","url":"https://swlai.github.io/BigInteger/","name":"BigInteger","description":"for big integer computation","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/BigInteger/assets/css/style.css?v=16bbb4ae66ce5b49454ec3da79baf2fc9181b051">
</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">
<h1><a href="https://github.com/swLai/BigInteger">BigInteger (github)</a></h1>
<h1 id="big-integer-computation">Big Integer Computation</h1>
<p>The class is aimed at easy adoption for big integers computation with medium performance in c++ programming.</p>
<h2 id="prerequisites">Notification</h2>
<p>
The class is under development, which means that the functionalities presented might not fit your needs.
Feal free to customize your own version, or pull a feature request to let me know what is missing.
</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Place the <code>./src</code> and <code>./include</code> documents inside your project directory and include the <code>BigInteger.h</code> file in your <code>*.cpp</code></p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#include "./include/BigInteger.h"
</code></pre></div></div>
<h2 id="basic-usage">Basic usage</h2>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#include <iostream>
#include "./include/BigInteger.h"
using namespace std;
int main(void) {
BigInteger bigint_1("+12345678987654321");
BigInteger bigint_2("-98765432123456789");
cout << "-(bigint_1) - bigint_2 = " << (-bigint_1) - bigint_2 << endl;
return 0;
}
</code></pre></div></div>
<p>That's it!</p>
<p>See <code>./demo.cpp</code> for more ideas about how to use the BigInteger class.</p>
<h2 id="basic-usage">Performance</h2>
<p>The following picture demonstrates the performance of using the BigInteger class to work with arbitrary large integer numbers:</p>
<p align="center">
<img src="./img/demo.png" width="75%" height="75%" />
</p>
<p>Note: The results are obtained from <code>./demo.cpp</code></p>
<p>Note 2: The FFT/KARATSUBA label below each panel is the indication of the "MULTIPLY" setting defined in <code>.\include\define.h</code></p>
<h2 id="author">Author</h2>
<ul>
<li><strong>Jason Lai</strong> - [email protected]</li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
</body>
</html>