[bigint] The compatibility of your BigInteger library
György Demarcsek <crazywew at gmail.com>
Tue Apr 28 11:10:41 PDT 2009
Dear Matt,
My name is George and I'm writing from Hungary. I have downloaded your
BigIntiger library written in C++. Congratulations, it seems to be very
useful and it was a very good job.It works excellent on my box (Lenovo
laptop, Ubuntu 8.04 g++ 4.2.4) but are you sure that your code works on any
architecture and any compiler? I mean, for example if I'm not mistaken, your
arithmetic add function is based on the fact, that GNU C++ compiler handle
overflows in additions by decreasing the result. For instance,
0xFFFFFFFF + 0xFFFFFFFF = 0xFFFFFFFE (32-bit architecture, g++) but of
course it is not right because the right result is 0x1FFFFFFFE. Of course,
you can find out the missing '1' and your code does this so. Do you think
that all C++ compilers on all machines handle rollovers caused by these "too
big" integer additions? I just ask because it looks like a very good and
practical idea and maybe I would also you this method in my codes if it is
not a problem, but I have to know if it is reliable or no.
I am looking forward to getting your answer. Thank you for reading my
e-mail.
P.S.: Sorry for my bad english.
Yours sincerely,
George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mattmccutchen.net/mailman/archives/bigint/attachments/20090428/6fdd2f0b/attachment.htm>
More information about the bigint
mailing list