I’m trying to use BigInteger for representing an unsigned 64 bit (long) coming from C in java and my approach is exactly same as mentioned in the following post.
http://technologicaloddity.com/2010/09/22/biginteger-as-unsigned-long-in-java/
Can one of you please validate that this approach is correct?
Any help in this regard appreciated.
Certainly, but do you really need it? There’s a major performance cost. The only time you need it unsigned is when comparing, which you can fix with a small unsigned-compare method. The rest of the time you can just use a long.