BigInteger or not BigInteger?
Posted
by Alon
on Stack Overflow
See other posts from Stack Overflow
or by Alon
Published on 2010-05-05T20:07:32Z
Indexed on
2010/05/05
20:18 UTC
Read the original article
Hit count: 366
java
|biginteger
In Java, most of the primitive types are signed (one bit is used to represent the +/-), and therefore when I am exceed the limits of this type, I can get many strange things, like negative numbers.
In the BigInteger class, I have no limits and there are some helpful functions there but it is pretty depressing to convert your beautiful code to work with the BigInteger class, specially when primitive operators don't work there and you must use functions from this class.
I was wondering if you had this problem, and if you have any better solution than the BigInteger class?
Thank you.
© Stack Overflow or respective owner