For this project I would like you to create a bigInt
class which overloads all of the basic
arithmetic operations *, +, -
and never faces an overflow.
All integers in C++ have finite size (yours will too at any particular moment) but I want you to manage the growth of your integers as users act on them.
By the way, this task, if done right, can lead to a successful career. Many great minds have thought about how to make the basics really fast. You guys don't have to worry about speed or read papers, but if you would like to ding the world you can explore how researchers are doing this.
+, *, -
to combine two bigInt
s into another bigInt
. (Or make a
different choice and defend it.)bigInt
s which returns a double
, and a different division which returns the
integer quotient as a bigInt
.<<
so that cout
displays the bigInt
well. Do >>
for cin
to.bigInts
which can also be added and multiplied both by a scalar and another
matrix.Check out this set of tutorials on overloading (pretty simple).
Check out https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic
https://en.wikipedia.org/wiki/List_of_arbitrary-precision_arithmetic_software