Skip to content

Commit 32ff94d

Browse files
author
Mahmoud
committed
Updated the readme file
1 parent bce9e42 commit 32ff94d

File tree

4 files changed

+92
-49
lines changed

4 files changed

+92
-49
lines changed

BigInteger.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/*
2-
BigInteger Class, performs basic arithmetic operations of very large integers.
3-
Copyright (C) 2011 Mahmoud Mechehoul
4-
5-
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License as published by
7-
the Free Software Foundation, either version 3 of the License, or
8-
(at your option) any later version.
9-
10-
This program is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
GNU General Public License for more details.
14-
15-
You should have received a copy of the GNU General Public License
16-
along with this program. If not, see <http://www.gnu.org/licenses/>.
17-
*/
2+
* BigInteger Class, performs basic arithmetic operations of very large integers.
3+
* Copyright (C) 2011 Mahmoud Mechehoul
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
1818

1919
#include <iostream>
2020
#include <algorithm>

BigInteger.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/*
2-
BigInteger Class, performs basic arithmetic operations of very large integers.
3-
Copyright (C) 2011 Mahmoud Mechehoul
4-
5-
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License as published by
7-
the Free Software Foundation, either version 3 of the License, or
8-
(at your option) any later version.
9-
10-
This program is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
GNU General Public License for more details.
14-
15-
You should have received a copy of the GNU General Public License
16-
along with this program. If not, see <http://www.gnu.org/licenses/>.
17-
*/
2+
* BigInteger Class, performs basic arithmetic operations of very large integers.
3+
* Copyright (C) 2011 Mahmoud Mechehoul
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
1818

1919
#ifndef BIGINT_H_
2020
#define BIGINT_H_

README

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
This is a library that performs basic arithmetic operations on large intergers that would not normally fit in a 64 bits integer
1+
BigIntegerCPP, a C++ Big Integer Library
2+
----------------------------------------
3+
4+
BigIntegerCPP is a C++ library that performs basic arithmetic operations on large intergers which would not normally fit in a 64 bits integer.
5+
6+
### Status:
7+
8+
At the present moment the library supports Big Integer Addition and Multiplication.
9+
In the future, I am planning to implement the Substraction and Division operations.
10+
Feel free to fork the project and add your own code.
11+
12+
### Test:
13+
14+
Run the following commands
15+
16+
make tests
17+
./run_tests
18+
19+
### Usage:
20+
21+
// Create two big integers
22+
BigInteger a("35742549198872617291353508656626642567");
23+
BigInteger b("1298074214633706835075030044377087");
24+
25+
// Perfom the addition and multiplication of the big integers
26+
// and store the result in new objects
27+
BigInteger c = a + b;
28+
BigInteger d = a * b;
29+
30+
// Display the operands (Big Integers) and opration result (another Big Integer)
31+
cout << a << " + " << b << " = " << c << endl;
32+
cout << a << " * " << b << " = " << d << endl;
33+
34+
### Run Demo:
35+
36+
I have included a single file implementation for your convenience.
37+
To run the demo uncomment the code in 'BigIntegerSingleFile' then run the following commands
38+
39+
make demo
40+
./demo
41+
42+
### Author:
43+
44+
Mahmoud Mechehoul (http://mahmoud.devgator.com)

tests.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/*
2-
BigInteger Class, performs basic arithmetic operations of very large integers.
3-
Copyright (C) 2011 Mahmoud Mechehoul
4-
5-
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License as published by
7-
the Free Software Foundation, either version 3 of the License, or
8-
(at your option) any later version.
9-
10-
This program is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
GNU General Public License for more details.
14-
15-
You should have received a copy of the GNU General Public License
16-
along with this program. If not, see <http://www.gnu.org/licenses/>.
17-
*/
2+
* BigInteger Class, performs basic arithmetic operations of very large integers.
3+
* Copyright (C) 2011 Mahmoud Mechehoul
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
1818

1919
#include <iostream>
2020
#include <cstdlib>

0 commit comments

Comments
 (0)